From: Holden Holden Date: 2008-01-10T18:53:43+09:00 Subject: Re: About array to hash conversion Robert Klemme wrote: > You can do this: > > array.inject({}) {|ha, (k, v)| ha[k] = v; ha} > > Is this nicer according to your standards? Thanks. Yes, it's clearer to separate key/value on the args. I must clarify that by "too ugly to consider" I meant "I imagine there is a nicer way to do it". Inject solutions are fine, short and clear, but I am still puzzled why Hash[*array] and Hash#to_a are not specular (maybe this is a question for a ruby-dev forum, though) regards -- Posted via http://www.ruby-forum.com/.