1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2008-09-17 10:22:11 +00:00
parent 4ac4e2fbc4
commit b452a519c9
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,11 @@
Wed Sep 17 19:16:47 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* 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]
Wed Sep 17 13:42:59 2008 Takeyuki Fujioka <xibbar@ruby-lang.org>
* lib/cgi/html.rb (checkbox_group,radio_group): bug fix

View file

@ -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?