[前][次][番号順一覧][スレッド一覧]

ruby-changes:3246

From: ko1@a...
Date: 27 Dec 2007 22:33:27 +0900
Subject: [ruby-changes:3246] usa - Ruby:r14739 (trunk): * lib/rubygems/commands/update_command.rb (do_rubygems_update): use

usa	2007-12-27 22:33:04 +0900 (Thu, 27 Dec 2007)

  New Revision: 14739

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/commands/update_command.rb

  Log:
    * lib/rubygems/commands/update_command.rb (do_rubygems_update): use
      portable and safely ENV operation. reported in
      <http://slashdot.jp/developers/comments.pl?sid=384937&cid=1273085>.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14739&r2=14738
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rubygems/commands/update_command.rb?r1=14739&r2=14738

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14738)
+++ ChangeLog	(revision 14739)
@@ -1,3 +1,9 @@
+Thu Dec 27 22:31:37 2007  NAKAMURA Usaku  <usa@r...>
+
+	* lib/rubygems/commands/update_command.rb (do_rubygems_update): use
+	  portable and safely ENV operation. reported in
+	  <http://slashdot.jp/developers/comments.pl?sid=384937&cid=1273085>.
+
 Thu Dec 27 21:47:04 2007  NAKAMURA Usaku  <usa@r...>
 
 	* mkconfig.rb (prefix): archdir is "1.9.0", not "1.9". reported in
Index: lib/rubygems/commands/update_command.rb
===================================================================
--- lib/rubygems/commands/update_command.rb	(revision 14738)
+++ lib/rubygems/commands/update_command.rb	(revision 14739)
@@ -122,11 +122,10 @@
       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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]