1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/io-console] Filter Ruby engine name rather than just /ruby/

This breaks tests using this path on JRuby because the `jruby`
executable turns into `jjruby` after the sub.

https://github.com/ruby/io-console/commit/e5951aa34c
This commit is contained in:
Charles Oliver Nutter 2020-01-13 13:42:56 -06:00 committed by Nobuyoshi Nakada
parent 4e1a7678cd
commit 569f56e0f7

View file

@ -462,7 +462,7 @@ defined?(IO.console) and TestIO_Console.class_eval do
noctty = [EnvUtil.rubybin, "-e", "Process.daemon(true)"]
when !(rubyw = RbConfig::CONFIG["RUBYW_INSTALL_NAME"]).empty?
dir, base = File.split(EnvUtil.rubybin)
noctty = [File.join(dir, base.sub(/ruby/, rubyw))]
noctty = [File.join(dir, base.sub(RUBY_ENGINE, rubyw))]
end
if noctty