Skip to content

Commit c6c5156

Browse files
hsbtmatzbot
authored andcommitted
[ruby/io-console] Alias value or join to take in old Ruby
ruby/io-console@7106d05219
1 parent 1740179 commit c6c5156

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/io/console/test_ractor.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ def test_ractor
88
path = $".find {|path| path.end_with?(ext)}
99
assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], [])
1010
begin;
11+
class Ractor
12+
alias value take
13+
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
14+
1115
$VERBOSE = nil
1216
r = Ractor.new do
1317
$stdout.console_mode
@@ -23,6 +27,10 @@ def test_ractor
2327

2428
assert_in_out_err(%W[-r#{path}], "#{<<~"begin;"}\n#{<<~'end;'}", ["true"], [])
2529
begin;
30+
class Ractor
31+
alias value take
32+
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
33+
2634
console = IO.console
2735
$VERBOSE = nil
2836
r = Ractor.new do

0 commit comments

Comments
 (0)