On 2005-03-22, James Edward Gray II <james / grayproductions.net> wrote:
>> times = [ '1', '2', '3', '4', '5']
>> events = [ 'eat', 'sleep', 'eat', 'play', 'sleep' ]
>>
>> times.size.times { |cnt|
>>   puts times[cnt] + ": " + events[cnt]
>> }
> Sure is.  You want Array#zip().

There is also Array#transpose:

[times, events].transpose.each { |t,e|
  puts t + ":" + e
}

Or maybe:
 
[times, events].transpose.each { |te|
  puts te.join(":")
}

Csaba