From: tsuraan Date: 2005-03-22T10:51:00+09:00 Subject: stepping through arrays simultaneously Suppose I have two arrays, one holding times, and the other holding events corresponding to the times. I want to step through both arrays at the same time. Is there an elegant way to do this? For example: times = [ '1', '2', '3', '4', '5'] events = [ 'eat', 'sleep', 'eat', 'play', 'sleep' ] times.size.times { |cnt| puts times[cnt] + ": " + events[cnt] } That's not too pretty; at least, I think the times.size.times {block} is ugly. Is there a way to join the arrays into an array of n-tuples and step through them one tuple at a time? I'm a newby, and not entirely sure what ruby builtins would make sense for this. Thanks!