ruby-changes:46854
From: nobu <ko1@a...>
Date: Tue, 30 May 2017 20:59:32 +0900 (JST)
Subject: [ruby-changes:46854] nobu:r58969 (trunk): test_rubyoptions.rb: ruby-runner sets $0 to install name now
nobu 2017-05-30 20:59:26 +0900 (Tue, 30 May 2017) New Revision: 58969 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58969 Log: test_rubyoptions.rb: ruby-runner sets $0 to install name now Modified files: trunk/test/lib/envutil.rb trunk/test/ruby/test_rubyoptions.rb Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 58968) +++ test/ruby/test_rubyoptions.rb (revision 58969) @@ -449,7 +449,8 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L449 def test_notfound 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 = Regexp.quote(rubybin) pat = Regexp.quote(notexist) Index: test/lib/envutil.rb =================================================================== --- test/lib/envutil.rb (revision 58968) +++ test/lib/envutil.rb (revision 58969) @@ -282,10 +282,7 @@ if defined?(RbConfig) https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L282 attr_reader :ruby end dir = File.dirname(ruby) - name = File.basename(ruby, CONFIG['EXEEXT']) CONFIG['bindir'] = dir - CONFIG['ruby_install_name'] = name - CONFIG['RUBY_INSTALL_NAME'] = name Gem::ConfigMap[:bindir] = dir if defined?(Gem::ConfigMap) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/