summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-25 00:06:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-25 00:15:39 +0900
commit6279e45cdefa3e61ca1c9c8085b15727cb2f4a60 (patch)
tree04a01ef76bfdb52b03e9614d0a6ce0859ebd2d8e /test
parent1fb45848257e3a599809c6cac52338999e604da0 (diff)
Arguments forwarding is not allowed in lambda [Feature #16253]
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 5b933d9682..5bbcbef3a4 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1476,6 +1476,8 @@ eom
assert_valid_syntax('def foo(...) end')
assert_syntax_error('iter do |...| end', /unexpected/)
assert_syntax_error('iter {|...|}', /unexpected/)
+ assert_syntax_error('->... {}', /unexpected/)
+ assert_syntax_error('->(...) {}', /unexpected/)
assert_syntax_error('def foo(x, y, z) bar(...); end', /unexpected/)
assert_syntax_error('def foo(x, y, z) super(...); end', /unexpected/)
assert_syntax_error('def foo(...) yield(...); end', /unexpected/)