ruby-changes:52373
From: hsbt <ko1@a...>
Date: Tue, 28 Aug 2018 11:39:28 +0900 (JST)
Subject: [ruby-changes:52373] hsbt:r64582 (trunk): Fixed test failures in mswin environment at r64555.
hsbt 2018-08-28 11:39:22 +0900 (Tue, 28 Aug 2018) New Revision: 64582 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64582 Log: Fixed test failures in mswin environment at r64555. [ruby-core:88699][Bug #15035] This patch was provided by MSP-Greg. Modified files: trunk/lib/rubygems/installer.rb Index: lib/rubygems/installer.rb =================================================================== --- lib/rubygems/installer.rb (revision 64581) +++ lib/rubygems/installer.rb (revision 64582) @@ -771,18 +771,19 @@ TEXT https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L771 # return the stub script text used to launch the true Ruby script def windows_stub_script(bindir, bin_file_name) + rb_bindir = RbConfig::CONFIG["bindir"] # All comparisons should be case insensitive - if bindir.downcase == RbConfig::CONFIG["bindir"].downcase + if bindir.downcase == rb_bindir.downcase # stub & ruby.exe withing same folder. Portable <<-TEXT @ECHO OFF @"%~dp0ruby.exe" "%~dpn0" %* TEXT - elsif bindir.downcase.start_with? RbConfig::TOPDIR.downcase + elsif bindir.downcase.start_with? (RbConfig::TOPDIR || File.dirname(rb_bindir)).downcase # stub within ruby folder, but not standard bin. Not portable require 'pathname' from = Pathname.new bindir - to = Pathname.new RbConfig::CONFIG["bindir"] + to = Pathname.new rb_bindir rel = to.relative_path_from from <<-TEXT @ECHO OFF -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/