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