aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 10:24:48 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 10:24:48 +0000
commit809013566ed1b6572ea028be3aad31f11d8f59df (patch)
tree92c87877d23b2ba190e70901fa93edd8203bdfd1
parentba49a1e025722a12a1cb58b5f90f7c548c91ba57 (diff)
downloadruby-809013566ed1b6572ea028be3aad31f11d8f59df.tar.gz
Write stdin_data only if it exists
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/envutil.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index ce7226f86d..732f0eeba8 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -62,7 +62,7 @@ module EnvUtil
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