diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-06-21 10:34:07 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-21 10:34:07 +0900 |
commit | 838d695c1652913ab5806ed677eab9b90b92becc (patch) | |
tree | 32687fa4ff56b3785490477abbf99d06db4aa578 /tool/runruby.rb | |
parent | 7561db8c009bb79a75024fa4ed0350bfb3d0626c (diff) |
Prefer ruby_install_name as runner
`Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has
the transformed basename.
Diffstat (limited to 'tool/runruby.rb')
-rwxr-xr-x | tool/runruby.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/runruby.rb b/tool/runruby.rb index 4715ff4d5c..9562efc00d 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -85,7 +85,8 @@ config = File.read(conffile) config.sub!(/^(\s*)RUBY_VERSION\b.*(\sor\s*)\n.*\n/, '') config = Module.new {module_eval(config, conffile)}::RbConfig::CONFIG -ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) +install_name = config["RUBY_INSTALL_NAME"]+config['EXEEXT'] +ruby = File.join(archdir, install_name) unless File.exist?(ruby) abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n" end @@ -106,7 +107,7 @@ env = { 'RUBY_FIBER_MACHINE_STACK_SIZE' => '1', } -runner = File.join(abs_archdir, "exe/ruby#{config['EXEEXT']}") +runner = File.join(abs_archdir, "exe/#{install_name}") runner = nil unless File.exist?(runner) abs_ruby = runner || File.expand_path(ruby) env["RUBY"] = abs_ruby |