Skip to content

Commit 443ed0c

Browse files
committed
Alias value or join to take in old Ruby
1 parent 324a7d5 commit 443ed0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/uri/test_common.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def test_extract
7474
def test_ractor
7575
return unless defined?(Ractor)
7676
assert_ractor(<<~RUBY, require: 'uri')
77+
class Ractor
78+
alias value take unless method_defined? :value # compat with Ruby 3.4 and olders
79+
end
7780
r = Ractor.new { URI.parse("https://ruby-lang.org/").inspect }
7881
assert_equal(URI.parse("https://ruby-lang.org/").inspect, r.value)
7982
RUBY

0 commit comments

Comments
 (0)