From 6279e45cdefa3e61ca1c9c8085b15727cb2f4a60 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 25 Oct 2019 00:06:43 +0900 Subject: Arguments forwarding is not allowed in lambda [Feature #16253] --- test/ruby/test_syntax.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') 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/) -- cgit v1.2.3