From: Jonathan Paisley Date: 2004-12-08T19:22:31+09:00 Subject: Re: Idiom for creating hash from two arrays On Wed, 08 Dec 2004 05:43:42 +0900, trans. (T. Onoma) wrote: > On Tuesday 07 December 2004 12:42 pm, Jonathan Paisley wrote: > | def Hash.from_pairs(keys,values) # or some better name > > zipnew ? Hash.zipnew ... I quite like the similarity to Hash.new, and the inclusion of the already familiar zip idea is also a good thing. Thinking again about the name 'from_pairs' makes me think that it would take a single array of pairs and make a hash from them (equivalent to Hash[*pairs.flatten]). So, I think I'll take your suggestion! Thanks.