[ruby-dev:52011] [Ruby master Feature#19134] ** is not allowed in def foo(...)

Issue #19134 has been updated by shugo (Shugo Maeda). Eregon (Benoit Daloze) wrote in #note-5:
IMHO if `...` is used then `*`, `**` and `&` should all be forbidden (a SyntaxError at parse time). Because that way is the best for optimizing delegation. And also taking apart `*` and `**` is arguably not really delegation anymore.
`&` is allowed in 3.1, so it's a breaking change to prohibit it. ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100493 * Author: shugo (Shugo Maeda) * Status: Closed * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- `*` 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. -- https://bugs.ruby-lang.org/
participants (1)
-
shugo (Shugo Maeda)