aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test/unit/parallel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit/parallel.rb')
-rw-r--r--lib/test/unit/parallel.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb
index ae1bf2961c..80dd4eae56 100644
--- a/lib/test/unit/parallel.rb
+++ b/lib/test/unit/parallel.rb
@@ -26,9 +26,9 @@ module Test
stdout = STDOUT.dup
- th = Thread.new(i.dup) do |io|
+ th = Thread.new do
begin
- while buf = (self.verbose ? io.gets : io.read(5))
+ while buf = (self.verbose ? i.gets : i.read(5))
stdout.puts "p #{[buf].pack("m").gsub("\n","")}"
end
rescue IOError
@@ -70,13 +70,11 @@ module Test
@@stop_auto_run = true
@opts = @options.dup
- STDOUT.sync = true
- STDOUT.puts "ready"
Signal.trap(:INT,"IGNORE")
-
-
@old_loadpath = []
begin
+ STDOUT.sync = true
+ STDOUT.puts "ready"
stdin = STDIN.dup
stdout = STDOUT.dup
while buf = stdin.gets
@@ -123,6 +121,7 @@ module Test
exit
end
end
+ rescue Errno::EPIPE
rescue Exception => e
begin
STDOUT.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}"