Bug #1298: wrong value for Hash of Hash
http://redmine.ruby-lang.org/issues/show/1298

Author: Heesob Park
Status: Open, Priority: Normal
Target version: 1.9.1
ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

I found wrong hash value for hash of hash in 1.9.1

In ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
irb(main):001:0> h = {}
=> {}
irb(main):002:0> h[1]=2
=> 2
irb(main):003:0> h[h]=3
=> 3
irb(main):004:0> h
=> {1=>2, {...}=>3}
irb(main):005:0> h[h]
=> 3
irb(main):006:0> h[h]=4
=> 4
irb(main):007:0> h
=> {1=>2, {...}=>4}
irb(main):008:0> h[h]
=> 4

In ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
irb(main):001:0> h = {}
=> {}
irb(main):002:0> h[1]=2
=> 2
irb(main):003:0> h[h]=3
=> 3
irb(main):004:0> h
=> {1=>2, {...}=>3}
irb(main):005:0> h[h]
=> nil
irb(main):006:0> h[h]=4
=> 4
irb(main):007:0> h
=> {1=>2, {...}=>3, {...}=>4}
irb(main):008:0> h[h]
=> nil


----------------------------------------
http://redmine.ruby-lang.org