From: "mame (Yusuke Endoh)" Date: 2022-12-14T07:12:58+00:00 Subject: [ruby-dev:52025] [Ruby master Feature#19134] ** is not allowed in def foo(...) Issue #19134 has been updated by mame (Yusuke Endoh). > IMHO if ... is used then *, ** and & should all be forbidden (a SyntaxError at parse time). I agree with this. If you want to do that, you should take it with `def foo(*, **, &)`. I feel that only `&` is acceptable since a block is implicitly passed. But I don't think `*` and `**` make sense inside `def foo(...)`. ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100630 * Author: shugo (Shugo Maeda) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: 3.2 ---------------------------------------- `*` 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/