From: Daniel Martin Date: 2006-06-28T00:32:41+09:00 Subject: Speaking of eql? (was: Ruby and Java equality usage) "Robert Dober" writes: > The eql? method returns true if *obj* and *anObject* have the same value. > Used by Hash to test > members for equality. For objects of class > Object, > eql? is synonymous with ==. Subclasses normally continue this tradition, but > there are exceptions. Note something that's peripherally related to == and eql? is the method "hash", which subclasses MUST override if they override eql? or == so that the guarantee: a.eql?(b) implies a.hash == b.hash is maintained. If you don't do this, your new objects will do all sorts of weird things when you try to use them as keys in a Hash or elements in a Set.