diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-06-03 08:41:53 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-06-03 18:13:15 +0900 |
| commit | d609a2311582fa6a67d0b15cc661c50291f0a313 (patch) | |
| tree | 906b89a17f5eb589e526668a07d0c2e232963bb5 /test/json | |
| parent | 267d8a04b369bd40ba229ff17995d1c09c917afa (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.rb | 10 |
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 |
