From 2a19074c6531fca99743a033b48a815d01f09409 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 27 Feb 2012 08:27:39 +0000 Subject: * 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 --- test/ruby/test_syntax.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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) -- cgit v1.2.3