From cc9fa3363e7f844118b752dcc53f63962005de8f Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 27 Dec 2024 13:35:32 +0900 Subject: [PATCH 1/4] Update steep --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2fe6d8850..d25947449 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,7 +122,7 @@ GEM ruby-progressbar (1.13.0) securerandom (0.4.1) stackprof (0.2.26) - steep (1.9.2) + steep (1.9.3) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) csv (>= 3.0.9) @@ -133,7 +133,7 @@ GEM logger (>= 1.3.0) parser (>= 3.1) rainbow (>= 2.2.2, < 4.0) - rbs (~> 3.7.0) + rbs (~> 3.8) securerandom (>= 0.1) strscan (>= 1.0.0) terminal-table (>= 2, < 4) From bf756bc48643b846d96191dabc546648dba92f5a Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 27 Dec 2024 13:35:43 +0900 Subject: [PATCH 2/4] Update CI config --- .github/workflows/comments.yml | 2 +- .github/workflows/ruby.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/comments.yml b/.github/workflows/comments.yml index 74f7f434e..154a422b3 100644 --- a/.github/workflows/comments.yml +++ b/.github/workflows/comments.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.4.0-rc1" + ruby-version: "3.4.1" bundler: none - name: Install dependencies run: | diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 55125be15..dd06f5123 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -13,26 +13,26 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.1', '3.2', '3.3', '3.4.0-rc1', head] + ruby: ['3.1', '3.2', '3.3', '3.4', head] rubyopt: [""] job: - test include: - ruby: head job: stdlib_test rubocop - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: stdlib_test - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: test rubyopt: "--enable-frozen-string-literal" - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: stdlib_test rubyopt: "--enable-frozen-string-literal" - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: lexer templates compile confirm_lexer confirm_templates - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: rubocop validate test_doc build test_generate_stdlib raap - - ruby: "3.4.0-rc1" + - ruby: "3.4" job: typecheck_test env: RANDOMIZE_STDLIB_TEST_ORDER: "true" From 91578f039a83976c81c179874ac40eb04e4ceaff Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 27 Dec 2024 13:36:41 +0900 Subject: [PATCH 3/4] Fix `Ractor.main?` test --- test/stdlib/Ractor_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/stdlib/Ractor_test.rb b/test/stdlib/Ractor_test.rb index fbc93b46d..ff1d512c9 100644 --- a/test/stdlib/Ractor_test.rb +++ b/test/stdlib/Ractor_test.rb @@ -40,8 +40,7 @@ def test_main def test_main? if_ruby("3.4"...) do - # FIXME: 3.4.0-rc1 ships with a bug that returns Integer instead of bool - assert_send_type "() -> boolish", Ractor, :main? + assert_send_type "() -> bool", Ractor, :main? end end From a38168bc375b57bee18f80f5c4d3e67f1447010d Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 27 Dec 2024 13:45:09 +0900 Subject: [PATCH 4/4] Fix `Ractor.store_if_absent` It in fact yields `nil`. Added `nil` in block parameter for testing. --- core/ractor.rbs | 2 +- test/stdlib/Ractor_test.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/ractor.rbs b/core/ractor.rbs index 731e835a2..eb50e1229 100644 --- a/core/ractor.rbs +++ b/core/ractor.rbs @@ -603,7 +603,7 @@ class Ractor # } # }.map(&:value).uniq.size #=> 1 and f() is called only once # - def self.store_if_absent: (Symbol) { () -> untyped } -> untyped + def self.store_if_absent: [A] (Symbol) { (nil) -> A } -> A #