diff options
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 7a11ec9554..88d48d705e 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -122,11 +122,10 @@ class Gem::Commands::UpdateCommand < Gem::Command setup_cmd = "#{Gem.ruby} setup.rb #{args.join ' '}" # Make sure old rubygems isn't loaded - if Gem.win_platform? then - system "set RUBYOPT= & #{setup_cmd}" - else - system "RUBYOPT=\"\" #{setup_cmd}" - end + old = ENV["RUBYOPT"] + ENV.delete("RUBYOPT") + system setup_cmd + ENV["RUBYOPT"] = old if old end end |