diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-06-03 15:59:25 +0900 |
---|---|---|
committer | git <[email protected]> | 2025-06-03 07:02:18 +0000 |
commit | c6c51569cb29a70aa086523d7508f88e645c72ff (patch) | |
tree | 70cc7214130d842dc5e504658376f41f0850314b /test | |
parent | 17401792fad0ac9a22067092cde9e4bfb1b0f0c7 (diff) |
[ruby/io-console] Alias value or join to take in old Ruby
https://github.com/ruby/io-console/commit/7106d05219
Diffstat (limited to 'test')
-rw-r--r-- | test/io/console/test_ractor.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/io/console/test_ractor.rb b/test/io/console/test_ractor.rb index 9f25f7dbbf..dff0c67eab 100644 --- a/test/io/console/test_ractor.rb +++ b/test/io/console/test_ractor.rb @@ -8,6 +8,10 @@ class TestIOConsoleInRactor < Test::Unit::TestCase 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 @@ class TestIOConsoleInRactor < Test::Unit::TestCase 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 |