aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test/unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit.rb')
-rw-r--r--lib/test/unit.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 6068e295fb..9a85951b83 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -293,7 +293,9 @@ module Test
end
def close
- @io.close
+ begin
+ @io.close if @io.closed?
+ rescue IOError; end
self
end
@@ -301,6 +303,7 @@ module Test
return if @io.closed?
@quit_called = true
@io.puts "quit"
+ @io.close
end
def died(*additional)