diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-09 14:28:06 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-09 14:28:06 +0000 |
commit | 4e817b39b42fb1089ed0d4eb5f8c4d3e0e695960 (patch) | |
tree | eb03ce997a98639257308ecf23237fd70db666ad /test | |
parent | 0a69f2e39de67d3d9887673b5030adcc5f2d0b81 (diff) | |
download | ruby-4e817b39b42fb1089ed0d4eb5f8c4d3e0e695960.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/stringio/test_stringio.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index 8bf6c595a0..0258218755 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -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 |