aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-28 02:39:22 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-28 02:39:22 +0000
commit9d9628eb9a7caeae26fffe61161ea8836d938f6a (patch)
tree39237651e788ab379ff8e1228095295d6f0cbdce /lib/rubygems
parentd0e5deb3ae8d4828d260f67812b1154696fd2d77 (diff)
downloadruby-9d9628eb9a7caeae26fffe61161ea8836d938f6a.tar.gz
Fixed test failures in mswin environment at r64555.
[ruby-core:88699][Bug #15035] This patch was provided by MSP-Greg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/installer.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index e9ad4d03d4..657f21296f 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -771,18 +771,19 @@ TEXT
# 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