From: gotoken@... (GOTO Kentaro) Date: 2001-03-07T00:59:36+09:00 Subject: [ruby-talk:12147] Re: (long) Re: hash.invert loses data if equal values exist - is this the right behaviour? In message "[ruby-talk:12145] Re: (long) Re: hash.invert loses data if equal values exist - is this the right behaviour?" on 01/03/07, Dave Thomas writes: >> Or is the morale that I should not invert hashes with equal values >> because the results are too difficult to predict? > >I guess it depends on the result you want. There are circumstances >where inverting a hash is a useful thing to be able to to, and others >where it might not make too much sense. You'll need to make a decision >based on your own application. I see. But I don't know the purpose of Hash#invert. IMHO, invert is not a so general method to be built-in... -- Gotoken