diff --git a/lib/envutil.rb b/lib/envutil.rb index ab5e8d8..71f7b96 100644 --- a/lib/envutil.rb +++ b/lib/envutil.rb @@ -225,7 +225,7 @@ def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr = args = [args] if args.kind_of?(String) # use the same parser as current ruby - if args.none? { |arg| arg.start_with?("--parser=") } + if RUBY_VERSION >= "3.3" && args.none? { |arg| arg.start_with?("--parser=") } args = ["--parser=#{current_parser}"] + args end pid = spawn(child_env, *precommand, rubybin, *args, opt)