mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Set Ruby parser if the given ruby accepts --parser
Now envutil.rb is a part of test-unit-ruby-core gem, which still supports old versions, 2.3 or later.
This commit is contained in:
parent
5b2ec0eb1b
commit
52287c68ab
@ -225,7 +225,8 @@ module EnvUtil
|
||||
|
||||
args = [args] if args.kind_of?(String)
|
||||
# use the same parser as current ruby
|
||||
if args.none? { |arg| arg.start_with?("--parser=") }
|
||||
if (args.none? { |arg| arg.start_with?("--parser=") } and
|
||||
/^ +--parser=/ =~ IO.popen([rubybin, "--help"], &:read))
|
||||
args = ["--parser=#{current_parser}"] + args
|
||||
end
|
||||
pid = spawn(child_env, *precommand, rubybin, *args, opt)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user