From: Heesob Park Date: 2011-01-11T15:58:33+09:00 Subject: [ruby-core:34334] [Ruby 1.9-Feature#4262][Open] {key=>val}.hash is always equal to {val=>key}.hash Feature #4262: {key=>val}.hash is always equal to {val=>key}.hash http://redmine.ruby-lang.org/issues/show/4262 Author: Heesob Park Status: Open, Priority: Normal Category: core, Target version: 1.9.x $ irb irb(main):001:0> {1=>2}.hash => -381777873 irb(main):002:0> {2=>1}.hash => -381777873 irb(main):003:0> {123=>"abc"}.hash => 661749683 irb(main):004:0> {"abc"=>123}.hash => 661749683 This happens for Ruby 1.8.7 and 1.9.x. It would be better to have different hash value for {key=>val} and {val=>key} . ---------------------------------------- http://redmine.ruby-lang.org