diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-20 11:30:43 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-20 11:30:43 +0000 |
commit | 935933d0d360dd535c33110f64b8e753877ec829 (patch) | |
tree | f7dfde85b2cd4d8bcaa2a90e290ee51d471163b3 | |
parent | 6aee0a5bca81903f0b67f949a57a698755ab891b (diff) | |
download | ruby-935933d0d360dd535c33110f64b8e753877ec829.tar.gz |
fix deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_io.rb | 5 |
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 |