From 9c23ccc085bbf3964a71d055122a3e3f1fc77308 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 4 Jun 2025 14:36:11 +0900 Subject: [PATCH 1/3] Use the latest version of assert_ractor for Ractor#value --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 428748c3..6185df02 100644 --- a/Gemfile +++ b/Gemfile @@ -6,5 +6,5 @@ group :development do gem 'rake-compiler', ">= 0.4.1" gem 'ruby-maven', :platforms => :jruby gem 'test-unit' - gem 'test-unit-ruby-core' + gem 'test-unit-ruby-core', ">= 1.0.7" end From 2f51c022803235cecf13d598739dc097d3c21742 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 4 Jun 2025 14:36:22 +0900 Subject: [PATCH 2/3] Revert "Alias value or join to take in old Ruby" This reverts commit 1a4d383efe0bf12e0e7d67c8ecf61ab39aec526c. --- test/psych/test_ractor.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/psych/test_ractor.rb b/test/psych/test_ractor.rb index 7821eed1..f1c8327a 100644 --- a/test/psych/test_ractor.rb +++ b/test/psych/test_ractor.rb @@ -4,10 +4,6 @@ class TestPsychRactor < Test::Unit::TestCase def test_ractor_round_trip assert_ractor(<<~RUBY, require_relative: 'helper') - class Ractor - alias value take - end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders - obj = {foo: [42]} obj2 = Ractor.new(obj) do |obj| Psych.unsafe_load(Psych.dump(obj)) @@ -32,10 +28,6 @@ def test_ractor_config # Test is to make sure it works, even though usage is probably very low. # The methods are not documented and might be deprecated one day assert_ractor(<<~RUBY, require_relative: 'helper') - class Ractor - alias value take - end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders - r = Ractor.new do Psych.add_builtin_type 'omap' do |type, val| val * 2 @@ -49,10 +41,6 @@ class Ractor def test_ractor_constants assert_ractor(<<~RUBY, require_relative: 'helper') - class Ractor - alias value take - end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders - r = Ractor.new do Psych.libyaml_version.join('.') == Psych::LIBYAML_VERSION end.value From 1a50aae1ab534a7121db05077d113a3afcda34f1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 4 Jun 2025 14:42:59 +0900 Subject: [PATCH 3/3] Skip to test release version of jruby --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e60df075..c4814ff9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: ruby-versions: uses: ruby/actions/.github/workflows/ruby_versions.yml@master with: - engine: cruby-jruby + engine: cruby min_version: 2.5 test: @@ -26,6 +26,11 @@ jobs: ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} os: [ ubuntu-latest, macos-latest, windows-latest ] include: + # jruby is broken with "undefined method 'init_struct'" + # https://github.com/ruby/psych/actions/runs/15434465445/job/43438083198?pr=734 + - { os: windows-latest, ruby: jruby-head } + - { os: macos-latest, ruby: jruby-head } + - { os: ubuntu-latest, ruby: jruby-head } - { os: windows-latest, ruby: ucrt } - { os: windows-latest, ruby: mingw } - { os: windows-latest, ruby: mswin }