[前][次][番号順一覧][スレッド一覧]

ruby-changes:61873

From: Nobuyoshi <ko1@a...>
Date: Sun, 21 Jun 2020 12:03:11 +0900 (JST)
Subject: [ruby-changes:61873] 838d695c16 (master): Prefer ruby_install_name as runner

https://git.ruby-lang.org/ruby.git/commit/?id=838d695c16

From 838d695c1652913ab5806ed677eab9b90b92becc Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 21 Jun 2020 10:34:07 +0900
Subject: Prefer ruby_install_name as runner

`Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has
the transformed basename.

diff --git a/tool/runruby.rb b/tool/runruby.rb
index 4715ff4..9562efc 100755
--- a/tool/runruby.rb
+++ b/tool/runruby.rb
@@ -85,7 +85,8 @@ config = File.read(conffile) https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L85
 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 = { https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L107
   '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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]