diff options
| author | kimu_shu <[email protected]> | 2018-04-27 11:40:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-04-28 11:26:23 +0900 |
| commit | 4b29abc565b5791d6d39b28358e2c82c17d3c500 (patch) | |
| tree | 722abe1f434b5ac71958fab9650f8f7cb3c8fe49 /mrblib | |
| parent | 84b499d02b0b612fc5c937dd40fcaa592a1f009e (diff) | |
| download | mruby-4b29abc565b5791d6d39b28358e2c82c17d3c500.tar.gz mruby-4b29abc565b5791d6d39b28358e2c82c17d3c500.zip | |
Fix Enumerable#hash on non 32-bit integer conf.
Diffstat (limited to 'mrblib')
| -rw-r--r-- | mrblib/enum.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/mrblib/enum.rb b/mrblib/enum.rb index a38f89ded..20638f7e8 100644 --- a/mrblib/enum.rb +++ b/mrblib/enum.rb @@ -333,16 +333,4 @@ module Enumerable # # ISO 15.3.2.2.20 alias to_a entries - - # redefine #hash 15.3.1.3.15 - def hash - h = 12347 - i = 0 - self.each do |e| - n = (e.hash & (0x7fffffff >> (i % 16))) << (i % 16) - h ^= n - i += 1 - end - h - end end |
