From: Ryan Leavengood Date: 2006-01-12T04:41:03+09:00 Subject: Re: Stupid question from a Ruby newb On 1/10/06, Will wrote: > > @myHash = objects.map do |object| [ object.key => object.value ] end You were on the right track with this one: @myHash = Hash[*objects.map{|o| [o.key, o.value]}.flatten] So we map the objects into array pairs of the key and value, flatten the resulting array, and then use the "splat" operator (*) to turn those into parameters to the Hash::[] method. Ryan