summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-29 22:49:19 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-29 22:49:19 +0000
commit7ffffab2363364d451952d437ebed2686e51f06a (patch)
treed812024375ab2e3a964477303e1ecc317bfdab83 /test
parent61ce01276dc8b2fe7afa85a8d788f7774a451f0a (diff)
merges r31248 from trunk into ruby_1_9_2.
-- * ext/stringio/stringio.c (strio_getline): check whether str is a string when str and lim are given. https://twitter.com/watson1978/status/56225052152168449 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/stringio/test_stringio.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 78718a2d86..c581681817 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -51,6 +51,8 @@ class TestStringIO < Test::Unit::TestCase
assert_equal("abc\n", StringIO.new("abc\n\ndef\n").gets)
assert_equal("abc\n\ndef\n", StringIO.new("abc\n\ndef\n").gets(nil))
assert_equal("abc\n\n", StringIO.new("abc\n\ndef\n").gets(""))
+ assert_raise(TypeError){StringIO.new("").gets(1, 1)}
+ assert_raise(TypeError){StringIO.new("").gets(nil, nil)}
end
def test_readlines