summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-05-06 17:23:36 +0200
committergit <svn-admin@ruby-lang.org>2024-05-06 17:06:50 +0000
commit00b1553dc6d7424682bd97bb92542dbefd9ddeb2 (patch)
tree860df180223d8344cb86b402c71e57b036e9d54e /test
parent5c018cddcca52c9d00c16cfad252a74750d0852e (diff)
[rubygems/rubygems] Remove more unnecessary compatibility code
https://github.com/rubygems/rubygems/commit/00d91f141b
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/helper.rb19
1 files changed, 1 insertions, 18 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index f97306717d..b90b7f28eb 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -453,7 +453,7 @@ class Gem::TestCase < Test::Unit::TestCase
FileUtils.rm_rf @tempdir
- restore_env
+ ENV.replace(@orig_env)
Gem::ConfigFile.send :remove_const, :SYSTEM_WIDE_CONFIG_FILE
Gem::ConfigFile.send :const_set, :SYSTEM_WIDE_CONFIG_FILE,
@@ -1526,23 +1526,6 @@ Also, a list:
PUBLIC_KEY = nil
PUBLIC_CERT = nil
end if Gem::HAVE_OPENSSL
-
- private
-
- def restore_env
- unless Gem.win_platform?
- ENV.replace(@orig_env)
- return
- end
-
- # Fallback logic for Windows below to workaround
- # https://bugs.ruby-lang.org/issues/16798. Can be dropped once all
- # supported rubies include the fix for that.
-
- ENV.clear
-
- @orig_env.each {|k, v| ENV[k] = v }
- end
end
# https://github.com/seattlerb/minitest/blob/13c48a03d84a2a87855a4de0c959f96800100357/lib/minitest/mock.rb#L192