1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2012-02-27 08:27:39 +00:00
parent 34205bc4ec
commit 2a19074c65

View file

@ -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)