From: "Eregon (Benoit Daloze)" Date: 2021-11-29T18:25:22+00:00 Subject: [ruby-core:106316] [Ruby master Feature#18351] Support anonymous rest and keyword rest argument forwarding Issue #18351 has been updated by Eregon (Benoit Daloze). Same comment as on https://github.com/ruby/ruby/pull/4961 (I'll copy for convenience): This could be problematic, because in various discussions and notably https://bugs.ruby-lang.org/issues/18011#note-6 and https://bugs.ruby-lang.org/issues/16456#note-9 it was relied that only `...` produces `[:rest, :*]`: Currently: ``` $ ruby -e 'p method(def m(...); end).parameters' [[:rest, :*], [:block, :&]] $ ruby -e 'p method(def m(*); end).parameters' [[:rest]] ``` I think we should not change the result of `parameters` for these cases, otherwise we may have compatibility issues and we won't have a reliable way to detect `...`. ---------------------------------------- Feature #18351: Support anonymous rest and keyword rest argument forwarding https://bugs.ruby-lang.org/issues/18351#change-94943 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- I would like to add support for the following syntax: ```ruby def foo(*) bar(*) end def baz(**) quux(**) end ``` This is a natural addition after the introduction of anonymous block forwarding. Anonymous rest and keyword rest arguments were already supported in method parameters, this just allows them to be used as arguments to other methods. The same advantages of anonymous block forwarding apply to rest and keyword rest argument forwarding. I've submitted a pull request implementing this syntax: https://github.com/ruby/ruby/pull/5148 -- https://bugs.ruby-lang.org/ Unsubscribe: