From: Roger Pack Date: 2008-12-14T09:17:09+09:00 Subject: [ruby-core:20539] [Bug #869] hashed hashes don't work in 1.8.6 Issue #869 has been updated by Roger Pack. Ahh--I see. Different hashes with the same key/values don't necessarily have the same order, hence not necessarily the same #hash value, so the fact that it works in 1.8.7/1.9: $ irb >> RUBY_VERSION => "1.8.7" >> a = {} => {} >> a[{:a => 3, :b => 4}] = 5 => 5 >> a[{:a => 3, :b => 4}] => 5 >> exit $ ruby_1_9_svn_installed/bin/irb >> a = {} => {} >> a[{:a => 3, :b => 4}] = 5 => 5 >> a[{:a => 3, :b => 4}] => 5 Is most likely a freak thing [except in 1.9, since order matters, it should hash the same if they're created the same way [?]]. http://blog.playlouder.com/2008/05/07/an-interesting-ruby-hash-semantics-gotcha/ Explains it better. Thank you. -=R ---------------------------------------- http://redmine.ruby-lang.org/issues/show/869 ---------------------------------------- http://redmine.ruby-lang.org