diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-23 08:00:08 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-23 08:00:08 +0000 |
commit | cfdeb2ef10d20347040af4ce42d858d7a25f7a83 (patch) | |
tree | 20639befe534e95c15faf55711f4ece9389c960d /test/ruby | |
parent | 5222cc1eac378cf3a0799cb615c646a21eedaf21 (diff) |
merge revision(s) 45637: [Backport #9726]
* parse.y (primary): flush cmdarg flags inside left-paren in a
command argument, to allow parenthesed do-block as an argument
without arguments parentheses. [ruby-core:61950] [Bug #9726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_syntax.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 06188cf073..3ccb18d446 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -78,6 +78,11 @@ class TestSyntax < Test::Unit::TestCase end end + def test_do_block_in_cmdarg + bug9726 = '[ruby-core:61950] [Bug #9726]' + assert_valid_syntax("tap (proc do end)", __FILE__, bug9726) + end + def test_keyword_rest bug5989 = '[ruby-core:42455]' assert_valid_syntax("def kwrest_test(**a) a; end", __FILE__, bug5989) |