summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-01 12:23:25 +0900
committerBenoit Daloze <eregontp@gmail.com>2019-11-30 18:18:20 +0100
commit5e0479f26afe1505afd9014ea96a206a88845828 (patch)
treed474b9c77755efcc28eba64fa115dd29e8423e4d /test
parentb94d06096b8f2a375719ce09370e004fcb277b25 (diff)
ENV.update should not call block on existing keys
[Bug #16192]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2512
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_env.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index d9301ff76c..ffce9b740c 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -445,7 +445,7 @@ class TestEnv < Test::Unit::TestCase
ENV.clear
ENV["foo"] = "bar"
ENV["baz"] = "qux"
- ENV.update({"baz"=>"quux","a"=>"b"}) {|k, v1, v2| v1 ? k + "_" + v1 + "_" + v2 : v2 }
+ ENV.update({"baz"=>"quux","a"=>"b"}) {|k, v1, v2| k + "_" + v1 + "_" + v2 }
check(ENV.to_hash.to_a, [%w(foo bar), %w(baz baz_qux_quux), %w(a b)])
end