From d609a2311582fa6a67d0b15cc661c50291f0a313 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 3 Jun 2025 08:41:53 +0200 Subject: [PATCH] [ruby/json] Update `JSONInRactorTest` to handle Ruby 3.5 Ractors. https://github.com/ruby/json/commit/d42b36963d --- test/json/ractor_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/json/ractor_test.rb b/test/json/ractor_test.rb index ced901bc5e..dda34c64c0 100644 --- a/test/json/ractor_test.rb +++ b/test/json/ractor_test.rb @@ -8,6 +8,16 @@ rescue LoadError end class JSONInRactorTest < Test::Unit::TestCase + unless Ractor.method_defined?(:value) + module RactorBackport + refine Ractor do + alias_method :value, :take + end + end + + using RactorBackport + end + def test_generate pid = fork do r = Ractor.new do