summaryrefslogtreecommitdiff
path: root/lib/rubygems/installer.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-19 22:51:38 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-19 22:51:38 +0000
commitcd8ef79d22f7e21bdae622634657aef5a8845640 (patch)
treea79bd7a06418fb8cabf75d912b9dd4f30a7fd45f /lib/rubygems/installer.rb
parentb6cdc43976f4dfbd0650f3c5d0414e0ffae72d9e (diff)
* lib/rubygems/installer.rb: Use gsub instead of gsub! to avoid
altering @bin_dir. Fixes tests on windows. [ruby-trunk - Bug #7885] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r--lib/rubygems/installer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index a9ab4c7a5b..0865a6dd3d 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -561,7 +561,9 @@ class Gem::Installer
# 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