ruby-changes:20756
From: luislavena <ko1@a...>
Date: Tue, 2 Aug 2011 06:22:25 +0900 (JST)
Subject: [ruby-changes:20756] luislavena:r32804 (trunk): Correct RubyGems bin check on Windows. Bug #5111
luislavena 2011-08-02 06:22:13 +0900 (Tue, 02 Aug 2011) New Revision: 32804 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32804 Log: Correct RubyGems bin check on Windows. Bug #5111 Modified files: trunk/ChangeLog trunk/lib/rubygems/installer.rb trunk/test/rubygems/test_gem_installer.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32803) +++ ChangeLog (revision 32804) @@ -1,3 +1,9 @@ +Tue Aug 2 06:18:15 2011 Luis Lavena <luislavena@g...> + + * 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 + Mon Aug 1 20:12:03 2011 NAKAMURA Usaku <usa@r...> * test/ruby/test_process.rb (TestProcess#windows?): new method. Index: lib/rubygems/installer.rb =================================================================== --- lib/rubygems/installer.rb (revision 32803) +++ lib/rubygems/installer.rb (revision 32804) @@ -434,6 +434,7 @@ 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." Index: test/rubygems/test_gem_installer.rb =================================================================== --- test/rubygems/test_gem_installer.rb (revision 32803) +++ test/rubygems/test_gem_installer.rb (revision 32804) @@ -208,9 +208,10 @@ 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" } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/