[ruby/json] Update JSONInRactorTest to handle Ruby 3.5 Ractors.

https://github.com/ruby/json/commit/d42b36963d
This commit is contained in:
Jean Boussier 2025-06-03 08:41:53 +02:00 committed by Hiroshi SHIBATA
parent 267d8a04b3
commit d609a23115
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -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