Skip to content

Commit

Permalink
Merge pull request #2206 from ruby/ruby-3.4.1
Browse files Browse the repository at this point in the history
Ruby 3.4.1
  • Loading branch information
soutaro authored Dec 27, 2024
2 parents b7271dd + a38168b commit f347cf9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/ractor.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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

# <!--
# rdoc-file=ractor.rb
Expand Down
10 changes: 8 additions & 2 deletions test/stdlib/Ractor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -108,6 +107,13 @@ def test_shareable?
Ractor, :shareable?, []
end

def test_store_if_absent
assert_send_type(
"(Symbol) { (nil) -> true } -> true",
Ractor, :store_if_absent, :test_store_if_absent, &->(_x) { true }
)
end

def test_yield
Ractor.new(Ractor.current) { |r| loop { r.take } }

Expand Down

0 comments on commit f347cf9

Please sign in to comment.