summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 44f1cfafc9..5ed0ac4d54 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -493,8 +493,11 @@ class TestIO < Test::Unit::TestCase
w.write "zz"
src = StringIO.new("abcd")
IO.copy_stream(src, w)
- w.close
+ t = Thread.new {
+ w.close
+ }
assert_equal("zzabcd", r.read)
+ t.join
}
end