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

* test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid

in block form.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-01-31 05:27:27 +00:00
parent 95b2f4107e
commit 8dd4353968
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Jan 31 14:27:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid
in block form.
Mon Jan 30 19:08:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_eval.c (vm_call0): should pass block to enumerators. patched

View file

@ -55,7 +55,7 @@ module EnvUtil
out_c.close if capture_stdout
err_c.close if capture_stderr && capture_stderr != :merge_to_stdout
if block_given?
return yield in_p, out_p, err_p
return yield in_p, out_p, err_p, pid
else
th_stdout = Thread.new { out_p.read } if capture_stdout
th_stderr = Thread.new { err_p.read } if capture_stderr && capture_stderr != :merge_to_stdout