From: Andrew Walrond Date: 2005-05-05T22:41:29+09:00 Subject: Re: Fwd: Re: Whats so different about a Hash? On Thursday 05 May 2005 14:31, ts wrote: > >>>>> "A" == Andrew Walrond writes: > > A> irb(main):033:0> {1=>2}=={1=>2} => true > A> irb(main):034:0> {1=>2}==={1=>2} => true > A> irb(main):035:0> {1=>2}.eql?({1=>2}) => false > > svg% ./irb > irb(main):001:0> RUBY_VERSION > => "1.9.0" > irb(main):002:0> {1=>2}=={1=>2} > => true > irb(main):003:0> {1=>2}==={1=>2} > => true > irb(main):004:0> {1=>2}.eql?({1=>2}) > => true > irb(main):005:0> svg% > > > Guy Decoux So 1.9 does what I would consider to be the _right thing_ :) So, whats the best way to modify the behaviour of Hash, to fix the bug in versions prior to 2004-12-25, and make the behaviour consistent across 1.8 and 1.9, such that Hash#[], hash#update etc etc work as per 1.9. I'm sure this must be easy.......Override eql? ? Andrew