diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-27 08:27:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-27 08:27:39 +0000 |
commit | 2a19074c6531fca99743a033b48a815d01f09409 (patch) | |
tree | 1d76cbabebd048d90b8ffce8ed6d37008b7a129d /test | |
parent | 34205bc4ec63f693d2ebab1b1371b2119d7c4391 (diff) | |
download | ruby-2a19074c6531fca99743a033b48a815d01f09409.tar.gz |
* 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')
-rw-r--r-- | test/ruby/test_syntax.rb | 10 |
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) |