Issue #9231 has been reported by phasis68 (Heesob Park).

----------------------------------------
Bug #9231: The value of [].hash is equal to the value of false.hash
https://bugs.ruby-lang.org/issues/9231

Author: phasis68 (Heesob Park)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.1.0dev (2013-12-09 trunk 44080) [x64-mswin64_120]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I found that [].hash == false.hash.
And the combinations of each elements also have the same value.
Is this an intended behavior?

C:\Users\phasis>irb
irb(main):001:0> [].hash
=> 1336528015
irb(main):002:0> false.hash
=> 1336528015

irb(main):003:0> [false,false].hash
=> -1570892633
irb(main):004:0> [false,[]].hash
=> -1570892633
irb(main):005:0> [[],false].hash
=> -1570892633
irb(main):006:0> [[],[]].hash
=> -1570892633

irb(main):008:0> {false=>false}.hash
=> -539662806
irb(main):009:0> {[]=>[]}.hash
=> -539662806
irb(main):010:0> {[]=>false}.hash
=> -539662806
irb(main):011:0> {false=>[]}.hash
=> -539662806



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