summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-21 21:53:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-21 21:53:50 +0900
commit041b5a9f67b73fcc08aa41dedc5c4ba4e63c701d (patch)
tree41ca57e92a0da77616cb7baf780df2a072a80f75 /mrblib
parent07bd65ae65ba1092191f5a702ce3c15aaca2ab5f (diff)
downloadmruby-041b5a9f67b73fcc08aa41dedc5c4ba4e63c701d.tar.gz
mruby-041b5a9f67b73fcc08aa41dedc5c4ba4e63c701d.zip
reduce object allocation in __update
Diffstat (limited to 'mrblib')
-rw-r--r--mrblib/hash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/hash.rb b/mrblib/hash.rb
index 20dd67091..0423f7edc 100644
--- a/mrblib/hash.rb
+++ b/mrblib/hash.rb
@@ -185,7 +185,7 @@ class Hash
end
def __update(h)
- h.each{|k,v| self[k] = v}
+ h.each_key{|k| self[k] = h[v]}
self
end
end