summaryrefslogtreecommitdiff
path: root/test/stringio/test_stringio.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/stringio/test_stringio.rb')
-rw-r--r--test/stringio/test_stringio.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index c581681817..8bf6c595a0 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -482,4 +482,12 @@ class TestStringIO < Test::Unit::TestCase
assert_raise(RuntimeError, bug) {s.string = "foo"}
assert_raise(RuntimeError, bug) {s.reopen("")}
end
+
+ def test_readlines_limit_0
+ assert_raise(ArgumentError, "[ruby-dev:43392]") { StringIO.new.readlines(0) }
+ end
+
+ def test_each_line_limit_0
+ assert_raise(ArgumentError, "[ruby-dev:43392]") { StringIO.new.each_line(0) }
+ end
end