Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 25672) +++ test/ruby/test_io.rb (working copy) @@ -798,7 +798,14 @@ print "no" if ok != 2 print "ok" End - assert_equal("ok", f.read) + begin + Timeout.timeout(10) do + assert_equal("ok", f.read) + end + rescue TimeoutError + Process.kill(:KILL, f.pid) + raise + end } end