From: Kelly Norton Date: 2006-03-31T15:01:51+09:00 Subject: Re: Most simple way to do "array + array => hash" Hal Fulton wrote: > Meino Christian Cramer wrote: >> Hi, >> >> Is there a ruby-like way to make an hash from two equeal sized >> arrays, one containing the keys only and the other the values ? >> >> Thanks a lot for any help in advance ! >> > > Would this work? > > Hash[*arr1.zip(arr2)] > > > Hal > I think a flatten is in needed as well: Hash[*keys.zip(vals).flatten] /kel