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
This commit is contained in:
parent
4d9c23772f
commit
715666cc28
@ -771,18 +771,19 @@ TEXT
|
|||||||
# return the stub script text used to launch the true Ruby script
|
# return the stub script text used to launch the true Ruby script
|
||||||
|
|
||||||
def windows_stub_script(bindir, bin_file_name)
|
def windows_stub_script(bindir, bin_file_name)
|
||||||
|
rb_bindir = RbConfig::CONFIG["bindir"]
|
||||||
# All comparisons should be case insensitive
|
# 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
|
# stub & ruby.exe withing same folder. Portable
|
||||||
<<-TEXT
|
<<-TEXT
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
@"%~dp0ruby.exe" "%~dpn0" %*
|
@"%~dp0ruby.exe" "%~dpn0" %*
|
||||||
TEXT
|
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
|
# stub within ruby folder, but not standard bin. Not portable
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
from = Pathname.new bindir
|
from = Pathname.new bindir
|
||||||
to = Pathname.new RbConfig::CONFIG["bindir"]
|
to = Pathname.new rb_bindir
|
||||||
rel = to.relative_path_from from
|
rel = to.relative_path_from from
|
||||||
<<-TEXT
|
<<-TEXT
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user