test_rubyoptions.rb: ruby-runner sets $0 to install name now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cf02692f3e
commit
76be4743ba
@ -282,10 +282,7 @@ if defined?(RbConfig)
|
|||||||
attr_reader :ruby
|
attr_reader :ruby
|
||||||
end
|
end
|
||||||
dir = File.dirname(ruby)
|
dir = File.dirname(ruby)
|
||||||
name = File.basename(ruby, CONFIG['EXEEXT'])
|
|
||||||
CONFIG['bindir'] = dir
|
CONFIG['bindir'] = dir
|
||||||
CONFIG['ruby_install_name'] = name
|
|
||||||
CONFIG['RUBY_INSTALL_NAME'] = name
|
|
||||||
Gem::ConfigMap[:bindir] = dir if defined?(Gem::ConfigMap)
|
Gem::ConfigMap[:bindir] = dir if defined?(Gem::ConfigMap)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -449,7 +449,8 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_notfound
|
def test_notfound
|
||||||
notexist = "./notexist.rb"
|
notexist = "./notexist.rb"
|
||||||
rubybin = EnvUtil.rubybin.dup
|
dir, *rubybin = RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME', 'EXEEXT')
|
||||||
|
rubybin = "#{dir}/#{rubybin.join('')}"
|
||||||
rubybin.gsub!(%r(/), '\\') if /mswin|mingw/ =~ RUBY_PLATFORM
|
rubybin.gsub!(%r(/), '\\') if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
rubybin = Regexp.quote(rubybin)
|
rubybin = Regexp.quote(rubybin)
|
||||||
pat = Regexp.quote(notexist)
|
pat = Regexp.quote(notexist)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user