From 1ce29a26dd9c3f81e7061d94bf4f25ba60b48691 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 15:43:32 +0900 Subject: [PATCH] Alias value to take in old Ruby --- test/date/test_date_ractor.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/date/test_date_ractor.rb b/test/date/test_date_ractor.rb index 91ea38b..1bcd913 100644 --- a/test/date/test_date_ractor.rb +++ b/test/date/test_date_ractor.rb @@ -5,6 +5,10 @@ class TestDateParseRactor < Test::Unit::TestCase def code(klass = Date, share: false) <<~RUBY.gsub('Date', klass.name) + class Ractor + alias value take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + share = #{share} d = Date.parse('Aug 23:55') Ractor.make_shareable(d) if share