mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix failures on ruby 3.1
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.
4705986643 (step)
:18:144
```
1)
Method#parameters adds * rest arg for "star" argument FAILED
Expected [[:rest]] == [[:rest, :*]]
to be truthy but was false
/home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:228:in `block (3 levels) in <top (required)>'
/home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:4:in `<top (required)>'
2)
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 <top (required)>'
/home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>'
```
This commit is contained in:
parent
d1a91076dc
commit
13241b71a5
1 changed files with 2 additions and 2 deletions
|
@ -222,14 +222,14 @@ describe "Method#parameters" do
|
|||
m.method(:handled_via_method_missing).parameters.should == [[:rest]]
|
||||
end
|
||||
|
||||
ruby_version_is '3.1' do
|
||||
ruby_version_is '3.2' do
|
||||
it "adds * rest arg for \"star\" argument" do
|
||||
m = MethodSpecs::Methods.new
|
||||
m.method(:one_unnamed_splat).parameters.should == [[:rest, :*]]
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is ''...'3.1' do
|
||||
ruby_version_is ''...'3.2' do
|
||||
it "adds nameless rest arg for \"star\" argument" do
|
||||
m = MethodSpecs::Methods.new
|
||||
m.method(:one_unnamed_splat).parameters.should == [[:rest]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue