We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Ractor#value
1 parent 3d00c0e commit 64bad43Copy full SHA for 64bad43
1 file changed
spec/crc_examples.rb
@@ -61,9 +61,16 @@
61
62
if defined?(Ractor)
63
it "should calculate CRC inside ractor" do
64
- digest = Ractor.new(described_class, string) { |klass, string|
+ ractor = Ractor.new(described_class, string) do |klass, string|
65
klass.hexdigest(string)
66
- }.take
+ end
67
+
68
+ # NOTE: Ractor#take was replaced with Ractor#value in 4.0.0
69
+ digest = if RUBY_VERSION >= '4.0.0'
70
+ ractor.value
71
+ else
72
+ ractor.take
73
74
75
expect(digest).to eq expected
76
end
0 commit comments