summaryrefslogtreecommitdiff
path: root/test/stringio
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-09 14:28:06 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-09 14:28:06 +0000
commit4e817b39b42fb1089ed0d4eb5f8c4d3e0e695960 (patch)
treeeb03ce997a98639257308ecf23237fd70db666ad /test/stringio
parent0a69f2e39de67d3d9887673b5030adcc5f2d0b81 (diff)
* 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/stringio')
-rw-r--r--test/stringio/test_stringio.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 8bf6c59..0258218 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