From: Joel VanderWerf Date: 2002-03-14T08:07:46+09:00 Subject: Re: process two arrays pairwise? I noticed that this just appeared on RAA: http://www.ruby-lang.org/en/raa-list.rhtml?name=Synchronized+Multi+Iterator There's also http://www.ruby-lang.org/en/raa-list.rhtml?name=Enumerable+tools See the 'diagonal' method, which, if you follow the link, is documented in http://redshift.sourceforge.net/enum/op.html It lets you work with arbitrary enumerables: for i, j, k in diagonal 1..4, 'a'..'d', ?a..?d printf "%4d. %s is 0x%x\n", i, j, k end puts # prints: # 1. a is 0x61 # 2. b is 0x62 # 3. c is 0x63 # 4. d is 0x64