summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-04 22:39:35 +0000
committerluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-04 22:39:35 +0000
commit3ddef8e50c3f3a2a081c658d6efb9dcc6b4738d0 (patch)
tree264442a48597b21580a9892009117b4c975e7b39
parent69dac45244023db7b022c1e512214c45f3283a4d (diff)
Backported r32804 from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/rubygems/installer.rb1
-rw-r--r--test/rubygems/test_gem_installer.rb3
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ad9c2f2e87..7dc8b54e44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Aug 5 07:35:00 2011 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/installer.rb (class Gem): Correct path check on Windows
+ Possible fix for [Ruby 1.9 - Bug #5111]
+ * test/rubygems/test_gem_installer.rb (load Gem): ditto
+ Backported from trunk r32804
+
Fri Aug 5 07:00:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/io/console/test_io_console.rb (test_noctty): daemon() on
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 338b926a83..74d803d7fa 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -434,6 +434,7 @@ class Gem::Installer
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
unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then
unless self.class.path_warning then
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index d3791d7911..3c6fb45589 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -208,9 +208,10 @@ load Gem.bin_path('a', 'executable', version)
end
def test_generate_bin_bindir_with_user_install_warning
+ bin_dir = Gem.win_platform? ? File.expand_path(ENV["WINDIR"]) : "/usr/bin"
options = {
- :bin_dir => "/usr/bin",
+ :bin_dir => bin_dir,
:install_dir => "/non/existant"
}