mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
parent
6f4eaa100f
commit
52d85c0efb
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue