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

ruby-changes:29304

From: naruse <ko1@a...>
Date: Mon, 17 Jun 2013 19:25:04 +0900 (JST)
Subject: [ruby-changes:29304] naruse:r41356 (trunk): Write stdin_data only if it exists

naruse	2013-06-17 19:24:48 +0900 (Mon, 17 Jun 2013)

  New Revision: 41356

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41356

  Log:
    Write stdin_data only if it exists

  Modified files:
    trunk/test/ruby/envutil.rb

Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 41355)
+++ test/ruby/envutil.rb	(revision 41356)
@@ -62,7 +62,7 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L62
     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
-      in_p.write stdin_data.to_str
+      in_p.write stdin_data.to_str unless stdin_data.empty?
       in_p.close
       if (!th_stdout || th_stdout.join(timeout)) && (!th_stderr || th_stderr.join(timeout))
         stdout = th_stdout.value if capture_stdout

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

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