summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io.rb3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e1bc00dd0b..ac0dd61c06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Sep 16 09:20:42 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * test/ruby/test_io.rb (TestIO#test_dup): exception should be
+ raised from IO#dup.
+
Tue Sep 16 08:35:29 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* test/ruby/test_io.rb (TestIO#test_dup): this test might fail if
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index a82cac239b..ba85b847be 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -632,6 +632,9 @@ class TestIO < Test::Unit::TestCase
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}
+ end
a.each do |r, w|
r.close unless !r || r.closed?
w.close unless !w || w.closed?