summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index c135cec4ea..965ef3e577 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -832,6 +832,14 @@ eom
assert_valid_syntax("foo (bar rescue nil)")
end
+ def test_cmdarg_in_paren
+ bug11873 = '[ruby-core:72482] [Bug #11873]'
+ assert_valid_syntax %q{a b{c d}, :e do end}, bug11873
+ assert_valid_syntax %q{a b(c d), :e do end}, bug11873
+ assert_valid_syntax %q{a b{c(d)}, :e do end}, bug11873
+ assert_valid_syntax %q{a b(c(d)), :e do end}, bug11873
+ end
+
private
def not_label(x) @result = x; @not_label ||= nil end