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

Issue #19134 has been updated by Eregon (Benoit Daloze). Although, it should still be possible to optimize delegation as good as possible and allow `*`/`**`/`&` by having those behave like `def args(*,**,&) = *`, `def kwargs(*,**,&) = **`, `def block(*,**,&) = &` and as if `*` was replaced by `args(...)`, etc, but that's of course at the expense of making the handling of those slightly slower and more complicated (but at least it doesn't slow down delegation via `(...)`). ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100489 * 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)
-
Eregon (Benoit Daloze)