Actions
Bug #4104
closedString#hash should return different value for different string.
Description
=begin
On Ruby 1.9.x, String#hash returns same value for any "\x00" trailing string.
C:\work>irb
irb(main):001:0> "a".hash
=> -242103097
irb(main):002:0> "a\x00".hash
=> -242103097
irb(main):003:0> "a\x00\x00".hash
=> -242103097
On Ruby 1.8.6, String#hash returns different value for different string.
C:\work>irb
irb(main):001:0> "a".hash
=> 100
irb(main):002:0> "a\x00".hash
=> 6561949
irb(main):003:0> "a\x00\x00".hash
=> 826408672
I think that String#hash should return different value for different string.
=end
Actions
Like0
Like0