ruby-changes:34175
From: akr <ko1@a...>
Date: Fri, 30 May 2014 22:48:22 +0900 (JST)
Subject: [ruby-changes:34175] akr:r46256 (trunk): Join threads.
akr 2014-05-30 22:48:06 +0900 (Fri, 30 May 2014) New Revision: 46256 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=46256&view=revision Log: Join threads. Modified files: trunk/test/io/wait/test_io_wait.rb Index: test/io/wait/test_io_wait.rb =================================================================== --- test/io/wait/test_io_wait.rb (revision 46255) +++ test/io/wait/test_io_wait.rb (revision 46256) @@ -62,13 +62,17 @@ class TestIOWait < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/io/wait/test_io_wait.rb#L62 end def test_wait_forever - Thread.new { sleep 0.01; @w.syswrite "." } + th = Thread.new { sleep 0.01; @w.syswrite "." } assert_equal @r, @r.wait + ensure + th.join end def test_wait_eof - Thread.new { sleep 0.01; @w.close } + th = Thread.new { sleep 0.01; @w.close } assert_nil @r.wait + ensure + th.join end def test_wait_writable -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/