From: Jonathan Paisley Date: 2004-12-07T22:52:33+09:00 Subject: Idiom for creating hash from two arrays Hello all, I'm currently using the following code for creating a hash from two arrays, where one array contains keys and the other the corresponding values: keys = ['one','two','three'] values = [1,2,3] h = Hash[*keys.zip(values).flatten] #=> {"three"=>3, "two"=>2, "one"=>1} Can anyone suggest a better way of doing this? I'm slightly put off by the many steps involved in my present solution. Thanks.