summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-06-03 08:41:53 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-06-03 18:13:15 +0900
commitd609a2311582fa6a67d0b15cc661c50291f0a313 (patch)
tree906b89a17f5eb589e526668a07d0c2e232963bb5 /test/json
parent267d8a04b369bd40ba229ff17995d1c09c917afa (diff)
[ruby/json] Update `JSONInRactorTest` to handle Ruby 3.5 Ractors.
https://github.com/ruby/json/commit/d42b36963d
Diffstat (limited to 'test/json')
-rw-r--r--test/json/ractor_test.rb10
1 files changed, 10 insertions, 0 deletions
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