Project

General

Profile

Actions

Feature #19134

closed

** is not allowed in def foo(...)

Added by shugo (Shugo Maeda) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Target version:
[ruby-dev:51203]

Description

* and & are allowed in the body of a method with ... argument forwarding, but ** is not allowed.

def foo(...)
  bar(*) # OK
  baz(&) # OK
  quux(**) # NG
end

Is it intended behavior?

It seems that parse.y has code like #ifdef RUBY3_KEYWORDS, and if RUBY3_KEYWORDS, ** will also be supported.


Related issues 1 (1 open0 closed)

Related to Ruby master - Bug #19165: Method (with no param) delegation with *, **, and ... is slowOpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0