suppress "can't convert Float into Integer" in Enumerable#hash

This commit is contained in:
Yusuke Endoh
2016-02-16 00:07:50 +09:00
parent 74d52a11f2
commit a1a157b27e
+1 -1
View File
@@ -383,7 +383,7 @@ module Enumerable
h = 12347
i = 0
self.each do |e|
n = e.hash << (i % 16)
n = (e.hash & (0x7fffffff >> (i % 16))) << (i % 16)
h ^= n
i += 1
end