avoid fixnum overflow for hashes
This commit is contained in:
parent
113b349af5
commit
671512b96c
@ -190,7 +190,7 @@ module Parfait
|
||||
hash_code += item_hash + (item_hash / 256 ) * index
|
||||
index += 1
|
||||
end
|
||||
hash_code
|
||||
hash_code % (2 ** 62)
|
||||
end
|
||||
|
||||
def self.str_hash(str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user