Skip to content

Commit

Permalink
[rubygems/rubygems] Remove more unnecessary compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and matzbot committed May 6, 2024
1 parent 5c018cd commit 00b1553
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions test/rubygems/helper.rb
Expand Up @@ -453,7 +453,7 @@ def teardown

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,
Expand Down Expand Up @@ -1526,23 +1526,6 @@ def self.key_path(key_name)
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
Expand Down

0 comments on commit 00b1553

Please sign in to comment.