aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-04-12 18:20:57 +0200
committergit <svn-admin@ruby-lang.org>2024-04-25 10:35:46 +0000
commit287137651078d540a14dfbe78dd99b277f3ac4d2 (patch)
tree3bae3a720d10ad4dc465228f471ec921a83107e4
parent5577f138b4422a23371a8192d9176b2f20aa6c8e (diff)
downloadruby-287137651078d540a14dfbe78dd99b277f3ac4d2.tar.gz
[rubygems/rubygems] Remove unnecessary workaround
All supported rubies include the fix. https://github.com/rubygems/rubygems/commit/9d74b699f5
-rw-r--r--lib/bundler/environment_preserver.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/bundler/environment_preserver.rb b/lib/bundler/environment_preserver.rb
index c4c1b53fa4..47fd4d9584 100644
--- a/lib/bundler/environment_preserver.rb
+++ b/lib/bundler/environment_preserver.rb
@@ -39,18 +39,7 @@ module Bundler
# Replaces `ENV` with the bundler environment variables backed up
def replace_with_backup
- unless Gem.win_platform?
- ENV.replace(backup)
- 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
-
- backup.each {|k, v| ENV[k] = v }
+ ENV.replace(backup)
end
# @return [Hash]