From: Yukihiro Matsumoto Date: 2005-04-20T12:59:00+09:00 Subject: Re: Lookup, a.collect{|i|b[i]} Hi, In message "Re: Lookup, a.collect{|i|b[i]}" on Wed, 20 Apr 2005 12:43:00 +0900, John Carter writes: |a = [3,6,3,1,6] # Arbitary Array of stuff |b = [1,2,3,4,5,6,7,8,9,0] # Could be Array or Hash, don't care. |p a.collect{|i|b[i]} |# Outputs... |#[4, 7, 4, 2, 7] How about b.values_at(*a) ? matz.