summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/open-uri/test_ftp.rb4
-rw-r--r--test/open-uri/test_proxy.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/open-uri/test_ftp.rb b/test/open-uri/test_ftp.rb
index 9698ff2777..0b3bafb9e0 100644
--- a/test/open-uri/test_ftp.rb
+++ b/test/open-uri/test_ftp.rb
@@ -8,10 +8,10 @@ class TestOpenURIFtp < Test::Unit::TestCase
begin
old = {}
h.each_key {|k| old[k] = ENV[k] }
- h.each {|k, v| ENV[k] = v }
+ ENV.update(h)
yield
ensure
- h.each_key {|k| ENV[k] = old[k] }
+ ENV.update(old)
end
end
diff --git a/test/open-uri/test_proxy.rb b/test/open-uri/test_proxy.rb
index a36a63f21f..0cc711a0f3 100644
--- a/test/open-uri/test_proxy.rb
+++ b/test/open-uri/test_proxy.rb
@@ -11,10 +11,10 @@ class TestOpenURIProxy < Test::Unit::TestCase
begin
old = {}
h.each_key {|k| old[k] = ENV[k] }
- h.each {|k, v| ENV[k] = v }
+ ENV.update(h)
yield
ensure
- h.each_key {|k| ENV[k] = old[k] }
+ ENV.update(old)
end
end