
Issue #19134 has been updated by shugo (Shugo Maeda). Status changed from Closed to Open I think it's most conservative to probhibit `*` and `**`: ``` def foo(...) bar(&) # OK baz(*) # error quux(**) # error end ``` And a error should occur in the following code instead of dropping keyword arguments: ``` def foo(*, **, &) bar(...) end def bar(*args, **kw, &block) p [args, kw, block&.call] end foo(1, 2, x: 3, y: 4) { 5 } ``` What do you think, Matz? ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100495 * Author: shugo (Shugo Maeda) * Status: Open * 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/