This language bar is your friend. Select your favorite languages!
Edit summary for version 6 :
[Ruby] did not fit on one line

Version 5

Version 6

Idiom #143 Iterate alternatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Idiom #143 Iterate alternatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Extra Keywords
parallel
Extra Keywords
parallel
Code
[items1, items2].transpose.each{|ar| ar.each{|item| p item }}
Code
[items1, items2].transpose.each{|ar| 
  ar.each{|item| p item }
}