summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 08:27:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 08:27:39 +0000
commit2a19074c6531fca99743a033b48a815d01f09409 (patch)
tree1d76cbabebd048d90b8ffce8ed6d37008b7a129d /test/ruby
parent34205bc4ec63f693d2ebab1b1371b2119d7c4391 (diff)
* test/ruby/test_syntax.rb (test_newline_in_block_parameters):
test for [ruby-dev:45292]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_syntax.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index bd60c8ad61..8afb2b7837 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -52,6 +52,16 @@ class TestSyntax < Test::Unit::TestCase
f.close!
end
+ def test_newline_in_block_parameters
+ bug = '[ruby-dev:45292]'
+ ["", "a", "a, b"].product(["", ";x", [";", "x"]]) do |params|
+ params = ["|", *params, "|"].join("\n")
+ assert_nothing_raised(SyntaxError, NameError, "#{bug} #{params.inspect}") do
+ eval("1.times{#{params}}")
+ end
+ end
+ end
+
private
def make_tmpsrc(f, src)