summaryrefslogtreecommitdiffhomepage
path: root/mrblib/enum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/enum.rb')
-rw-r--r--mrblib/enum.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/mrblib/enum.rb b/mrblib/enum.rb
index 20638f7e8..a97a26f97 100644
--- a/mrblib/enum.rb
+++ b/mrblib/enum.rb
@@ -333,4 +333,15 @@ 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|
+ h = __update_hash(h, i, e.hash)
+ i += 1
+ end
+ h
+ end
end