From c501767d1288f617458603064c5903289ec04363 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 16:01:59 +0900 Subject: [PATCH] Alias value or join to take in old Ruby --- test/pathname/test_ractor.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/pathname/test_ractor.rb b/test/pathname/test_ractor.rb index 340692d..f06b750 100644 --- a/test/pathname/test_ractor.rb +++ b/test/pathname/test_ractor.rb @@ -9,6 +9,10 @@ def setup def test_ractor_shareable assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + class Ractor + alias value take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + begin; $VERBOSE = nil require "pathname" @@ -19,4 +23,3 @@ def test_ractor_shareable end; end end -