Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions truffle/src/main/ruby/core/hash.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1
@@ -37,8 +37,11 @@ def initialize(key, value)

end

alias_method :each_original, :each

def each_item
each do |key, value|
# use aliased each to protect against overriding #each
each_original do |key, value|
yield KeyValue.new(key, value)
end
nil

0 comments on commit f8d0c9f

Please sign in to comment.