mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
f53dfab95c
This allows 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. This has some minor changes to #parameters output. Now, instead of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`. These were already used for `...` forwarding, so I think it makes it more consistent to include them in other cases. If we want to use `[:rest], [:keyrest]` in both cases, that is also possible. I don't think the previous behavior of `[:rest], [:keyrest]` in the non-... case and `[:rest, :*], [:keyrest, :**]` in the ... case makes sense, but if we did want that behavior, we'll have to make more substantial changes, such as using a different ID in the ... forwarding case. Implements [Feature #18351] |
||
---|---|---|
.. | ||
csv | ||
images | ||
irb | ||
optparse | ||
pty | ||
syntax | ||
time | ||
yjit | ||
.document | ||
bsearch.rdoc | ||
bug_triaging.rdoc | ||
case_mapping.rdoc | ||
ChangeLog-0.06_to_0.52 | ||
ChangeLog-0.50_to_0.60 | ||
ChangeLog-0.60_to_1.1 | ||
ChangeLog-1.8.0 | ||
ChangeLog-1.9.3 | ||
ChangeLog-2.0.0 | ||
ChangeLog-2.1.0 | ||
ChangeLog-2.2.0 | ||
ChangeLog-2.3.0 | ||
ChangeLog-2.4.0 | ||
ChangeLog-YARV | ||
contributing.rdoc | ||
dig_methods.rdoc | ||
documentation_guide.rdoc | ||
dtrace_probes.rdoc | ||
extension.ja.rdoc | ||
extension.rdoc | ||
fiber.md | ||
forwardable.rd.ja | ||
globals.rdoc | ||
hacking.md | ||
implicit_conversion.rdoc | ||
keywords.rdoc | ||
maintainers.rdoc | ||
make_cheatsheet.md | ||
marshal.rdoc | ||
memory_view.md | ||
NEWS-1.8.7 | ||
NEWS-1.9.1 | ||
NEWS-1.9.2 | ||
NEWS-1.9.3 | ||
NEWS-2.0.0 | ||
NEWS-2.1.0 | ||
NEWS-2.2.0 | ||
NEWS-2.3.0 | ||
NEWS-2.4.0 | ||
NEWS-2.5.0 | ||
NEWS-2.6.0 | ||
NEWS-2.7.0 | ||
NEWS-3.0.0.md | ||
NEWS-3.1.0.md | ||
ractor.md | ||
regexp.rdoc | ||
security.rdoc | ||
signals.rdoc | ||
standard_library.rdoc | ||
syntax.rdoc | ||
yarvarch.en | ||
yarvarch.ja |