summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-20 11:30:43 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-20 11:30:43 +0000
commit935933d0d360dd535c33110f64b8e753877ec829 (patch)
treef7dfde85b2cd4d8bcaa2a90e290ee51d471163b3 /test/ruby/test_io.rb
parent6aee0a5bca81903f0b67f949a57a698755ab891b (diff)
fix deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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