[前][次][番号順一覧][スレッド一覧]

ruby-changes:70750

From: Kazuhiro <ko1@a...>
Date: Thu, 6 Jan 2022 10:19:35 +0900 (JST)
Subject: [ruby-changes:70750] 5e7cd480f9 (master): Fix spec failure on ruby 3.1

https://git.ruby-lang.org/ruby.git/commit/?id=5e7cd480f9

From 5e7cd480f968cddc4c6d6ad0e1a4fa74e5ee3938 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Thu, 6 Jan 2022 10:14:11 +0900
Subject: Fix spec failure on ruby 3.1

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 <top (required)>'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>'
```
---
 spec/ruby/core/proc/parameters_spec.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spec/ruby/core/proc/parameters_spec.rb b/spec/ruby/core/proc/parameters_spec.rb
index 60620722f81..11a38b66e31 100644
--- a/spec/ruby/core/proc/parameters_spec.rb
+++ b/spec/ruby/core/proc/parameters_spec.rb
@@ -80,13 +80,13 @@ describe "Proc#parameters" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/proc/parameters_spec.rb#L80
     -> x {}.parameters.should == [[:req, :x]]
   end
 
-  ruby_version_is '3.1' do
+  ruby_version_is '3.2' do
     it "adds * rest arg for \"star\" argument" do
       -> x, * {}.parameters.should == [[:req, :x], [:rest, :*]]
     end
   end
 
-  ruby_version_is ''...'3.1' do
+  ruby_version_is ''...'3.2' do
     it "adds nameless rest arg for \"star\" argument" do
       -> x, * {}.parameters.should == [[:req, :x], [:rest]]
     end
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]