From 7eaee5b5e24bcd9e0a43656d7785805798fc4d56 Mon Sep 17 00:00:00 2001 From: glass Date: Mon, 23 Sep 2013 03:17:38 +0000 Subject: [PATCH] * hash.c (env_each_pair): do not call rb_assoc_new() if it isn't needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ hash.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index de5419aedb..52fd761eab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 23 12:11:26 2013 Masaki Matsushita + + * hash.c (env_each_pair): do not call rb_assoc_new() if + it isn't needed. + Mon Sep 23 10:42:30 2013 Nobuyoshi Nakada * test/ruby/test_module.rb (TestModule#test_include_toplevel): test diff --git a/hash.c b/hash.c index 1098118737..8c72da2c05 100644 --- a/hash.c +++ b/hash.c @@ -2901,8 +2901,15 @@ env_each_pair(VALUE ehash) } FREE_ENVIRON(environ); - for (i=0; i 1) { + for (i=0; i