From fe7be8e7f89778cc40dbca881602a8770981d29b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 15:59:25 +0900 Subject: [PATCH] Alias value or join to take in old Ruby --- test/io/console/test_ractor.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/io/console/test_ractor.rb b/test/io/console/test_ractor.rb index 9f25f7d..dff0c67 100644 --- a/test/io/console/test_ractor.rb +++ b/test/io/console/test_ractor.rb @@ -8,6 +8,10 @@ def test_ractor path = $".find {|path| path.end_with?(ext)} assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], []) begin; + class Ractor + alias value take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + $VERBOSE = nil r = Ractor.new do $stdout.console_mode @@ -23,6 +27,10 @@ def test_ractor assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], []) begin; + class Ractor + alias value take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + console = IO.console $VERBOSE = nil r = Ractor.new do