Actions
Feature #4262
closed{key=>val}.hash is always equal to {val=>key}.hash
Description
=begin
$ 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} .
=end
Actions
Like0
Like0