[ruby/date] Alias value to take in old Ruby
https://github.com/ruby/date/commit/1ce29a26dd
This commit is contained in:
parent
6f4eaa100f
commit
52d85c0efb
@ -5,6 +5,10 @@ require 'date'
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user