From: "Jesús Gabriel y Galán" Date: 2009-02-01T05:04:32+09:00 Subject: Re: Array#to_h On Sat, Jan 31, 2009 at 8:49 PM, Roger Pack wrote: > Not that I would find it useful at all, but is there is a Hash#to_a > should there not be an Array#to_h? > Thanks! A possible implementation: >> class Array >> def to_h >> Hash[*self] >> end >> end => nil >> [1,2,3,4].to_h => {1=>2, 3=>4} Jesus.