From 7c03431929ae7fd6508acf88001fb80acf0cfe29 Mon Sep 17 00:00:00 2001 From: kazu Date: Wed, 17 Sep 2008 10:22:11 +0000 Subject: * test/ruby/test_io.rb (TestIO#test_dup): avoid infinite loop. [ruby-dev:36326] * test/ruby/test_io.rb (TestIO#test_dup): remove needless open. [ruby-dev:35957] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index ba85b847b..4d9bb51fe 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -624,16 +624,12 @@ class TestIO < Test::Unit::TestCase assert_equal("", f2.read) end - proc do - open(__FILE__) # see Bug #493 [ruby-dev:35957] - end.call - a = [] assert_raise(Errno::EMFILE, Errno::ENFILE, Errno::ENOMEM) do loop {a << IO.pipe} end assert_raise(Errno::EMFILE, Errno::ENFILE, Errno::ENOMEM) do - loop {a[-1][0].dup; a[-1][1].dup} + loop {a << [a[-1][0].dup, a[-1][1].dup]} end a.each do |r, w| r.close unless !r || r.closed? -- cgit