summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index d4a51cc8dc..0c41847c52 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -44,6 +44,15 @@ class TestIO < Test::Unit::TestCase
r.close
end
+ def test_gets_limit_extra_arg
+ with_pipe {|r, w|
+ r, w = IO.pipe
+ w << "0123456789"
+ w.close
+ assert_raise(TypeError) { r.gets(3,nil) }
+ }
+ end
+
# This test cause SEGV.
def test_ungetc
r, w = IO.pipe