More of a syntax curiosity than a problem to solve...
I have two arrays of equal length, and want to iterate over them both at once - for example, to output both the
In addition to a.zip(b).each{|x,y| } as others have said, you can also say [a,b].transpose.each{|x,y| }, which strikes me as a tiny bit more symmetrical. Probably not as fast, though, since you're creating the extra [a,b] array.
a.zip(b).each{|x,y| }
[a,b].transpose.each{|x,y| }
[a,b]