diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-02-16 10:43:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-02-16 10:43:12 +0900 |
| commit | 5596d14c00e4b639f8d6228a477850a2e62c21ab (patch) | |
| tree | ee0d7c358322087022719111d67a87a138ced5f0 | |
| parent | 683ff0cbd0e7478e2fbd1331b2ac260fc44a7ec8 (diff) | |
| parent | a1a157b27eb18d6d531193bd874b31d1165c19ae (diff) | |
| download | mruby-5596d14c00e4b639f8d6228a477850a2e62c21ab.tar.gz mruby-5596d14c00e4b639f8d6228a477850a2e62c21ab.zip | |
Merge pull request #3107 from mame/fix-enum-hash
[255, 255, 255, 255, 255].hash raises "can't convert Float into Integer"
| -rw-r--r-- | mrblib/enum.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/enum.rb b/mrblib/enum.rb index 650d24302..fb55efcf8 100644 --- a/mrblib/enum.rb +++ b/mrblib/enum.rb @@ -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 |
