summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-04-12 16:07:49 +0900
committerNobuyoshi Nakada <[email protected]>2024-04-12 16:07:49 +0900
commite36988450e9e9ccccb41c72135f1e57790920668 (patch)
tree2a671b2f464701bedbdc69ded905f90c7991a0b3 /test/ruby/test_syntax.rb
parent971b552735f46cbda7345e8de60a2037ee10e259 (diff)
[Bug #20423] Disallow anonymous block within argument forwarding
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 7cc5e542a7..44162f06cb 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -190,6 +190,7 @@ class TestSyntax < Test::Unit::TestCase
assert_syntax_error("def f(...); g(0, *); end", /no anonymous rest parameter/)
assert_syntax_error("def f(...); g(**); end", /no anonymous keyword rest parameter/)
assert_syntax_error("def f(...); g(x: 1, **); end", /no anonymous keyword rest parameter/)
+ assert_syntax_error("def f(...); g(&); end", /no anonymous block parameter/)
end
def test_newline_in_block_parameters