From: Dan Debertin Date: 2002-06-07T22:05:56+09:00 Subject: Re: How to create one hash from two arrays Radek Hnilica writes: > > How can I simply build one hash from two arrays. One containing keys > and second containing values. Assuming a one-to-one correspondence between keys[0] and vals[0], keys[1] and vals[1], etc: keys.each_index { |k| h[keys[k]] = vals[k] } Dan -- airboss@nodewarrior.org www.nodewarrior.org ignorami: n: The art of folding problem users into representational shapes.