From 992cc9469bbe92f97a95a32e09d5916428ebe980 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 27 Dec 2007 13:33:04 +0000 Subject: * lib/rubygems/commands/update_command.rb (do_rubygems_update): use portable and safely ENV operation. reported in . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/rubygems/commands/update_command.rb | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18b5819752..cf457d3830 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 27 22:31:37 2007 NAKAMURA Usaku + + * lib/rubygems/commands/update_command.rb (do_rubygems_update): use + portable and safely ENV operation. reported in + . + Thu Dec 27 21:47:04 2007 NAKAMURA Usaku * mkconfig.rb (prefix): archdir is "1.9.0", not "1.9". reported in 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 -- cgit v1.2.3