aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support/helpers.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-01-08 16:11:52 +0900
committerNARUSE, Yui <naruse@airemix.jp>2020-03-27 14:43:20 +0900
commit7b5133801340cfa7e4e4e5dd61384cb90c3f6085 (patch)
treef00b7f885a6c43d82222ce65f3b92451ba5aa870 /spec/bundler/support/helpers.rb
parent572021c6e4e01c3b8ece90ad42fdd4ee71b8acc5 (diff)
downloadruby-7b5133801340cfa7e4e4e5dd61384cb90c3f6085.tar.gz
Merge bundler-2.1.4
Diffstat (limited to 'spec/bundler/support/helpers.rb')
-rw-r--r--spec/bundler/support/helpers.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index 7d1bd65185..e9c9e766cf 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -210,8 +210,10 @@ module Spec
yield stdin, stdout, wait_thr if block_given?
stdin.close
- command_execution.stdout = Thread.new { stdout.read }.value.strip
- command_execution.stderr = Thread.new { stderr.read }.value.strip
+ stdout_read_thread = Thread.new { stdout.read }
+ stderr_read_thread = Thread.new { stderr.read }
+ command_execution.stdout = stdout_read_thread.value.strip
+ command_execution.stderr = stderr_read_thread.value.strip
command_execution.exitstatus = wait_thr && wait_thr.value.exitstatus
end