envutil.rb: rubybin: keyword
* test/ruby/envutil.rb (invoke_ruby): add rubybin: keyword option to specify the command to run scripts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ac65855df7
commit
765a0d53a1
@ -33,6 +33,7 @@ module EnvUtil
|
|||||||
def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr = false,
|
def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr = false,
|
||||||
encoding: nil, timeout: 10, reprieve: 1,
|
encoding: nil, timeout: 10, reprieve: 1,
|
||||||
stdout_filter: nil, stderr_filter: nil,
|
stdout_filter: nil, stderr_filter: nil,
|
||||||
|
rubybin: EnvUtil.rubybin,
|
||||||
**opt)
|
**opt)
|
||||||
in_c, in_p = IO.pipe
|
in_c, in_p = IO.pipe
|
||||||
out_p, out_c = IO.pipe if capture_stdout
|
out_p, out_c = IO.pipe if capture_stdout
|
||||||
@ -51,7 +52,7 @@ module EnvUtil
|
|||||||
child_env.update(args.shift)
|
child_env.update(args.shift)
|
||||||
end
|
end
|
||||||
args = [args] if args.kind_of?(String)
|
args = [args] if args.kind_of?(String)
|
||||||
pid = spawn(child_env, EnvUtil.rubybin, *args, **opt)
|
pid = spawn(child_env, rubybin, *args, **opt)
|
||||||
in_c.close
|
in_c.close
|
||||||
out_c.close if capture_stdout
|
out_c.close if capture_stdout
|
||||||
err_c.close if capture_stderr && capture_stderr != :merge_to_stdout
|
err_c.close if capture_stderr && capture_stderr != :merge_to_stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user