From: "Florian Groß" Date: 2006-06-06T06:33:01+09:00 Subject: Re: Array.to_hash Nitay wrote: > My suggestion, if no other nice/easy alternative exists, is a method like: > > N.to_hash Hm, am I understanding you correctly in that you want a method that will turn [[key1, val1], [key2, val2]] into { key1 => val1, key2 => val2 }? If so then this is Hash.from_assoc() which I have already wished to be in core Ruby in the past. It can be implemented like this in pure Ruby: def Hash.from_assoc(assoc) assoc.inject({}) { |state, (key, val)| state.merge(key => val) } end -- http://flgr.0x42.net/