From: Mauricio Fernandez Date: 2006-06-21T00:07:22+09:00 Subject: Re: uniq() Oddity On Tue, Jun 20, 2006 at 11:56:21PM +0900, James Edward Gray II wrote: > >>So which one is uniq() really using? eql?()? > > > >both, uniq creates a hash from the array. > > OK, let me expand my question slightly: why are hash() and eql?() > not meaningfully defined for Hash? > > Doesn't Array.hash just aggregate the hash() of its elements? Why > could Hash not do the same? There's also Hash#default and Hash#default_proc to take in mind. And you can't rely on Proc#hash and friends... Otherwise, it's trivially implementable. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby