Skip to content

Commit 1f3c80e

Browse files
authored
Merge pull request #127 from ruby/fix-ractor-value
Alias value to take in old Ruby
2 parents a959bd8 + 1ce29a2 commit 1f3c80e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/date/test_date_ractor.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
class TestDateParseRactor < Test::Unit::TestCase
66
def code(klass = Date, share: false)
77
<<~RUBY.gsub('Date', klass.name)
8+
class Ractor
9+
alias value take
10+
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
11+
812
share = #{share}
913
d = Date.parse('Aug 23:55')
1014
Ractor.make_shareable(d) if share

0 commit comments

Comments
 (0)