Skip to content

Commit 7d11900

Browse files
hsbtko1kou
authored andcommitted
[ruby/stringio] Support Ractor#value
(ruby/stringio#134) from https://bugs.ruby-lang.org/issues/21262 We need to alias `Ractor#value` to `Ractor#take` for old versions of Ruby. --------- ruby/stringio@9954dabd80 Co-authored-by: Koichi Sasada <ko1@atdot.net> Co-authored-by: Sutou Kouhei <kou@clear-code.com>
1 parent c6c5156 commit 7d11900

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stringio/test_ractor.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ def setup
88

99
def test_ractor
1010
assert_in_out_err([], <<-"end;", ["true"], [])
11+
class Ractor
12+
alias value take unless method_defined? :value # compat with Ruby 3.4 and olders
13+
end
14+
1115
require "stringio"
1216
$VERBOSE = nil
1317
r = Ractor.new do

0 commit comments

Comments
 (0)