summaryrefslogtreecommitdiff
path: root/test/strscan/test_ractor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/strscan/test_ractor.rb')
-rw-r--r--test/strscan/test_ractor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/strscan/test_ractor.rb b/test/strscan/test_ractor.rb
index 9a279d2929..a13fd8fd13 100644
--- a/test/strscan/test_ractor.rb
+++ b/test/strscan/test_ractor.rb
@@ -8,6 +8,10 @@ class TestStringScannerRactor < Test::Unit::TestCase
def test_ractor
assert_in_out_err([], <<-"end;", ["stra", " ", "strb", " ", "strc"], [])
+ class Ractor
+ alias value take unless method_defined? :value # compat with Ruby 3.4 and olders
+ end
+
require "strscan"
$VERBOSE = nil
r = Ractor.new do
@@ -22,7 +26,7 @@ class TestStringScannerRactor < Test::Unit::TestCase
s.scan(/\\w+/)
]
end
- puts r.take.compact
+ puts r.value.compact
end;
end
end