>    At this point I would like to advance the next index in a.each but
> remain in b.each, another word, b[4] will not become b[5] after the

I can't really understand your example (including the one in your
latter posting about cows and pigs). But I got what you mean, I think.

a=[1,2,3,4,5]
b=[5,4,3,2,1]
next_i = false
a.each do |i|
puts "i=#{i}"
if next_i
next_i = false
next
end
b.each do |j|
if i==j
puts "Advance i to #{i+1}, keep j at #{j}"
i += 1
next_i = true
redo
end
puts "i=#{i}\tj=#{j}"
end
end

The output for the above follows after my signature.

In all honesty, the above is ugly and confusing. How about using
nested while? That will allow a much finer control, shorter code, and
makes a clearer point because, at least for me, if I see a nested
each, I do not expect for the inner each to control the outer
each.

YS.

i=1
i=1	j=5
i=1	j=4
i=1	j=3
i=1	j=2
Advance i to 2, keep j at 1
i=2	j=1
i=2
i=3
i=3	j=5
i=3	j=4
Advance i to 4, keep j at 3
i=4	j=3
i=4	j=2
i=4	j=1
i=4
i=5
Advance i to 6, keep j at 5
i=6	j=5
i=6	j=4
i=6	j=3
i=6	j=2
i=6	j=1