<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/spec/ruby/core/proc/parameters_spec.rb, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Update to ruby/spec@d8bacef</title>
<updated>2025-05-09T21:22:15+00:00</updated>
<author>
<name>Andrew Konchin</name>
<email>andry.konchin@gmail.com</email>
</author>
<published>2025-05-07T10:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=269ad29de95e41cc8a4eede84b98a81a6ff4f7b6'/>
<id>269ad29de95e41cc8a4eede84b98a81a6ff4f7b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@5e579e2</title>
<updated>2025-03-27T10:09:24+00:00</updated>
<author>
<name>Andrew Konchin</name>
<email>andry.konchin@gmail.com</email>
</author>
<published>2025-03-26T17:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bac22c985ecc7e4309b5b5e5ae1074c81319e889'/>
<id>bac22c985ecc7e4309b5b5e5ae1074c81319e889</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@3a510bb</title>
<updated>2024-02-26T13:45:30+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2024-02-26T13:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=815db5c0289f5bbea2af275933ba6a4bf60a6967'/>
<id>815db5c0289f5bbea2af275933ba6a4bf60a6967</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@3fc4444</title>
<updated>2024-02-05T15:29:57+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2024-02-05T15:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=40642cd3bc581d3bb402ea5e8e61cdfb868b4f68'/>
<id>40642cd3bc581d3bb402ea5e8e61cdfb868b4f68</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@c3206f6</title>
<updated>2023-11-27T17:17:52+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-11-27T17:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cc05a60c16b69b6156396f9e6a009f94421fe1b4'/>
<id>cc05a60c16b69b6156396f9e6a009f94421fe1b4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@7f69c86</title>
<updated>2023-04-25T15:09:53+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-04-25T15:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d562663e4098801c1d7fa7c64a335ea71231a598'/>
<id>d562663e4098801c1d7fa7c64a335ea71231a598</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@aaf998f</title>
<updated>2022-03-28T15:47:04+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2022-03-28T15:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8db4f25bf4327f169902afd9ea8f4b03b65656f0'/>
<id>8db4f25bf4327f169902afd9ea8f4b03b65656f0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Proc#parameters support lambda keyword for returning parameters as if lambda</title>
<updated>2022-03-17T18:52:02+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-08-28T01:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6804d62f822237e136e698e006c913df9990ec2'/>
<id>b6804d62f822237e136e698e006c913df9990ec2</id>
<content type='text'>
This makes it easier to use Proc#parameters to build wrappers.

Implements [Feature #15357]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it easier to use Proc#parameters to build wrappers.

Implements [Feature #15357]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix spec failure on ruby 3.1</title>
<updated>2022-01-06T01:14:11+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2022-01-06T01:14:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5e7cd480f968cddc4c6d6ad0e1a4fa74e5ee3938'/>
<id>5e7cd480f968cddc4c6d6ad0e1a4fa74e5ee3938</id>
<content type='text'>
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.

13241b71a50dded0a7b021ec4f2fb6a995daace9 did not fix proc spec yet.

https://github.com/ruby/actions/runs/4718820699?check_suite_focus=true#step:18:173
```
  1)
  Proc#parameters adds * rest arg for "star" argument FAILED
  Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]]
  to be truthy but was false
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in &lt;top (required)&gt;'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `&lt;top (required)&gt;'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.

13241b71a50dded0a7b021ec4f2fb6a995daace9 did not fix proc spec yet.

https://github.com/ruby/actions/runs/4718820699?check_suite_focus=true#step:18:173
```
  1)
  Proc#parameters adds * rest arg for "star" argument FAILED
  Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]]
  to be truthy but was false
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in &lt;top (required)&gt;'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `&lt;top (required)&gt;'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for anonymous rest and keyword rest argument forwarding</title>
<updated>2021-12-30T22:37:42+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-11-19T17:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f53dfab95c30e222f67e610234f63d3e9189234d'/>
<id>f53dfab95c30e222f67e610234f63d3e9189234d</id>
<content type='text'>
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]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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]
</pre>
</div>
</content>
</entry>
</feed>
