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

ruby-changes:27272

From: drbrain <ko1@a...>
Date: Wed, 20 Feb 2013 07:51:49 +0900 (JST)
Subject: [ruby-changes:27272] drbrain:r39324 (trunk): * lib/rubygems/installer.rb: Use gsub instead of gsub! to avoid

drbrain	2013-02-20 07:51:38 +0900 (Wed, 20 Feb 2013)

  New Revision: 39324

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39324

  Log:
    * lib/rubygems/installer.rb:  Use gsub instead of gsub! to avoid
      altering @bin_dir.  Fixes tests on windows.  [ruby-trunk - Bug #7885]

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/installer.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39323)
+++ ChangeLog	(revision 39324)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Feb 20 07:51:19 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems/installer.rb:  Use gsub instead of gsub! to avoid
+	  altering @bin_dir.  Fixes tests on windows.  [ruby-trunk - Bug #7885]
+
 Tue Feb 19 20:50:00 2013  Kenta MURATA  <mrkn@m...>
 
 	* ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0.
Index: lib/rubygems/installer.rb
===================================================================
--- lib/rubygems/installer.rb	(revision 39323)
+++ lib/rubygems/installer.rb	(revision 39324)
@@ -561,7 +561,9 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L561
   # DOC: Missing docs or :nodoc:.
   def check_that_user_bin_dir_is_in_path
     user_bin_dir = @bin_dir || Gem.bindir(gem_home)
-    user_bin_dir.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
+    user_bin_dir = user_bin_dir.gsub(File::SEPARATOR, File::ALT_SEPARATOR) if
+      File::ALT_SEPARATOR
+
     path = ENV['PATH']
     if Gem.win_platform? then
       path = path.downcase

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

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