diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-06-03 16:41:19 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-03 18:13:15 +0900 |
commit | 365d5b6bf44e4779af0abaf5fee7af9c7c39d224 (patch) | |
tree | 0661cd22f0c61515d427b6e8d2ea244375be3b61 | |
parent | d609a2311582fa6a67d0b15cc661c50291f0a313 (diff) |
[ruby/time] Alias value or join to take in old Ruby
https://github.com/ruby/time/commit/2a1827b0ce
-rw-r--r-- | test/test_time.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |