On Wed, 28 Jun 2006, Jacob Fugal wrote: > On 6/27/06, Jacob Fugal <lukfugl / gmail.com> wrote: >> #eql? is used in hash key collision resolution. Under nearly all >> circumstances, #eql? will be synonymous with #==, and if your class >> needs to override #== it will be sufficient to alias #eql? to #==. >> Just note there are rare exceptions. > > The one question I do have regarding this is why isn't the default > implementation of Object#eql? as an alias to Object#==? The > documentation makes it clear that that's the intended behavior, and > the common behavior for descendants of Object as well. It seems odd > that it's not then codified as an alias. It seems redundant that we > have to always remember to alias #eql? if we override #==; why can't > it be the default to already be an alias? but alias take a copy of the aliased method - so you'd still need to re-alias right? -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama