From: Brian Candler Date: 2003-07-22T05:59:13+09:00 Subject: Re: Proposal: Array#to_h, to simplify hash generation On Tue, Jul 22, 2003 at 05:46:35AM +0900, Simon Strandgaard wrote: > Important: Hash#append should not overwrite earlier entries. Hmm. What should it do then? Raise an exception? h1.update(h2) will overwrite corresponding keys in h1, so there is a precedent for collect_into working in that way. I would rule out, say, automatically promoting a value into an array. It's too application-specific. If your application does in fact hold a hash of arrays, then I think you'd code your append method accordingly; in other cases, the structure may be different (a hash of hashes, say), in which case the append method is different. Cheers, Brian.