[#106355] [Ruby master Bug#18373] RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'. — "vo.x (Vit Ondruch)" <noreply@...>
Issue #18373 has been reported by vo.x (Vit Ondruch).
28 messages
2021/12/01
[ruby-core:106865] [Ruby master Feature#18351] Support anonymous rest and keyword rest argument forwarding
From:
"palkan (Vladimir Dementyev)" <noreply@...>
Date:
2021-12-28 13:36:49 UTC
List:
ruby-core #106865
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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>