From: Christoph Rippel Date: 2001-03-20T14:38:07+09:00 Subject: [ruby-talk:12913] Re: Hash-Hash - behavior clarification? > From: dave@thomases.com [mailto:dave@thomases.com]On Behalf Of Dave [...] > > It violates the rules because of > > > > a = {}; b = {}; > > p a.eql? b # => true , but > > p a.hash == b.hash # => false > > Which version of Ruby are you running? On my 1.6.3: Quite likely I am running a virtual version - the maschine I am at right now does not have ruby running ... > > a = {} # => {} > b = {} # => {} > a.eql? b # => false > a.hash == b.hash # => false very likely (head in shame ...) I did not take into account that #eql? might not the same as #== even if a,b are from the same Class - pointing out that Hash#eql? is id-based for Hashes might be a good idea so. Christoph > > Dave >