From 365d5b6bf44e4779af0abaf5fee7af9c7c39d224 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 16:41:19 +0900 Subject: [PATCH] [ruby/time] Alias value or join to take in old Ruby https://github.com/ruby/time/commit/2a1827b0ce --- test/test_time.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_time.rb b/test/test_time.rb index 55964d02fc..06db77b365 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -74,6 +74,9 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc: if defined?(Ractor) def test_rfc2822_ractor assert_ractor(<<~RUBY, require: 'time') + class Ractor + alias value take unless method_defined? :value # compat with Ruby 3.4 and olders + end actual = Ractor.new { Time.rfc2822("Fri, 21 Nov 1997 09:55:06 -0600") }.value assert_equal(Time.utc(1997, 11, 21, 9, 55, 6) + 6 * 3600, actual) RUBY