On Wed, 08 Dec 2004 23:25:10 +0900, Glenn Parker wrote:

> However, the more I think about it, the more I see this as a typical 
> operation on existing hashes, not simply a constructor.  So, I would 
> rather see alternate forms for merge and update:
> 
>       Hash#merge(keyArray, valueArray)
>       Hash#update(keyArray, valueArray)
> 
> Then, to the original problem would be expressed as:
> 
>       h = Hash.new.merge(keyArray, valueArray)

That's a good point. Given that, I don't think it's really necessary to 
make any alterations to the constructors.

I suppose in the example above using merge! or update would be appropriate,
since the original hash isn't needed.

  h = Hash.new.merge!(keys,values)

In addition, it would be nice if keys and values need not be arrays - 
just Enumerables. Implementing this may be a bit tricky, however.