From: Alexandru Popescu Date: 2006-06-27T09:06:54+09:00 Subject: Re: Ruby and Java equality usage On 6/27/06, Eric Hodel wrote: > On Jun 26, 2006, at 4:38 AM, Alexandru Popescu wrote: > > > I have posted a quick (reminder like) entry about how equality is > > handled by Ruby and Java: > > > > http://themindstorms.blogspot.com/2006/06/parallel-of-equality-in-2- > > worlds-ruby.html > > > > However, I feel I have missed to explain correctly why eql? and == > > are both needed. > > #eql? is used to resolve key collisions in hashes. > > If two objects have the same #hash and are #eql? then they refer to > the same hash key. If two objects have the same #hash and are not > #eql? they refer to different hash keys. > ... and still wondering how is this answering my question (however thanks for the intention). ./alex -- .w( the_mindstorm )p. --- (http://themindstorms.blogspot.com)