mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/stringio/stringio.c (strio_each):
Fix exception message and don't raise immediately if block is not given. Fixes [ruby-dev:43394]. * test/stringio/test_stringio.rb (test_each_line_limit_0): Fix test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a69f2e39d
commit
4e817b39b4
3 changed files with 14 additions and 4 deletions
|
|
@ -488,6 +488,7 @@ class TestStringIO < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_each_line_limit_0
|
||||
assert_raise(ArgumentError, "[ruby-dev:43392]") { StringIO.new.each_line(0) }
|
||||
assert_raise(ArgumentError, "[ruby-dev:43392]") { StringIO.new.each_line(0){} }
|
||||
assert_raise(ArgumentError, "[ruby-dev:43392]") { StringIO.new.each_line("a",0){} }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue