From: "palkan (Vladimir Dementyev)" Date: 2021-12-28T13:36:49+00:00 Subject: [ruby-core:106865] [Ruby master Feature#18351] Support anonymous rest and keyword rest argument forwarding Issue #18351 has been updated by palkan (Vladimir Dementyev). @jeremyevans0 I've been working on supporting this feature for Ruby Next, and found a weird edge case: ``` def foo_with_pattern(*, **) case some_value in [0, 1, *] bar(*) in {a:, b:, **} baz(**) end end ``` As far as I understand, the delegation works here; and confusion is present, too. ---------------------------------------- Feature #18351: Support anonymous rest and keyword rest argument forwarding https://bugs.ruby-lang.org/issues/18351#change-95676 * 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: