Project

General

Profile

Bug #12198

Updated by skalee (Sebastian Skalacki) almost 9 years ago

Hi! 

 Sorry for lack of the accuracy in the bug title. I have some trouble with pinpointing the issue. 

 According to documentation, "two hashes are equal if they each contain the same number of keys and if each key-value pair is equal to (according to Object#==) the corresponding elements in the other hash." I was able to produce two hashes a hash which satisfy satisfies this condition, however the method returns false. In other words, following happens: 

 ~~~ 
 e.class #=> Hash 
 r.class #=> Hash 
 e.size == r.size #=> true 
 e.each_pair.to_a == r.each_pair.to_a #=> true 
 e == r #=> false 
 ~~~ 

 That happens in Ruby 1.9.3, 2.3, 2.4 and probably in other versions as well. 

 Happy Easter ]:->

Back