diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 6326aec..fef3f70 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -74,8 +74,11 @@ def test_extract def test_ractor return unless defined?(Ractor) assert_ractor(<<~RUBY, require: 'uri') + class Ractor + alias value take unless method_defined? :value # compat with Ruby 3.4 and olders + end r = Ractor.new { URI.parse("https://ruby-lang.org/").inspect } - assert_equal(URI.parse("https://ruby-lang.org/").inspect, r.take) + assert_equal(URI.parse("https://ruby-lang.org/").inspect, r.value) RUBY end