We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c505f4 commit 082cfcfCopy full SHA for 082cfcf
test/ruby/test_syntax.rb
@@ -1709,6 +1709,8 @@ def test_argument_forwarding
1709
assert_syntax_error('def foo(...) foo[...] = x; end', /unexpected/)
1710
assert_syntax_error('def foo(...) foo(...) { }; end', /both block arg and actual block given/)
1711
assert_syntax_error('def foo(...) defined?(...); end', /unexpected/)
1712
+ assert_syntax_error('def foo(*rest, ...) end', '... after rest argument')
1713
+ assert_syntax_error('def foo(*, ...) end', '... after rest argument')
1714
1715
obj1 = Object.new
1716
def obj1.bar(*args, **kws, &block)
0 commit comments