From: Marnen Laibow-Koser Date: 2009-12-05T14:44:14+09:00 Subject: Re: convert an array to a hash Andrey Zaikin wrote: > irb(main):001:0> a=["a", "hello", "b", "world", "c", "welcome", "d", > "baby"] > => ["a", "hello", "b", "world", "c", "welcome", "d", "baby"] > irb(main):002:0> Hash[*a] > => {"a"=>"hello", "b"=>"world", "c"=>"welcome", "d"=>"baby"} > irb(main):003:0> > > --- > http://zed.0xff.me Oh, right. I thought Hash had a constructor like that, but I couldn't find it in the docs. Thanks! Best, --  Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.