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

ruby-changes:48069

From: nobu <ko1@a...>
Date: Sun, 15 Oct 2017 11:20:26 +0900 (JST)
Subject: [ruby-changes:48069] nobu:r60183 (trunk): envutil.rb: precommand in invoke_ruby [ci skip]

nobu	2017-10-15 11:20:20 +0900 (Sun, 15 Oct 2017)

  New Revision: 60183

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60183

  Log:
    envutil.rb: precommand in invoke_ruby [ci skip]
    
    * test/lib/envutil.rb (invoke_ruby): add precommand option to
      invoke ruby via some other commands, e.g., sudo.

  Modified files:
    trunk/test/lib/envutil.rb
Index: test/lib/envutil.rb
===================================================================
--- test/lib/envutil.rb	(revision 60182)
+++ test/lib/envutil.rb	(revision 60183)
@@ -59,7 +59,7 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L59
                   encoding: nil, timeout: 10, reprieve: 1, timeout_error: Timeout::Error,
                   stdout_filter: nil, stderr_filter: nil,
                   signal: :TERM,
-                  rubybin: EnvUtil.rubybin,
+                  rubybin: EnvUtil.rubybin, precommand: nil,
                   **opt)
     timeout = apply_timeout_scale(timeout)
     reprieve = apply_timeout_scale(reprieve) if reprieve
@@ -81,7 +81,7 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L81
       child_env.update(args.shift)
     end
     args = [args] if args.kind_of?(String)
-    pid = spawn(child_env, rubybin, *args, **opt)
+    pid = spawn(child_env, *precommand, rubybin, *args, **opt)
     in_c.close
     out_c.close if capture_stdout
     err_c.close if capture_stderr && capture_stderr != :merge_to_stdout

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

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