[ruby/stringio] Support Ractor#value
(https://github.com/ruby/stringio/pull/134) from https://bugs.ruby-lang.org/issues/21262 We need to alias `Ractor#value` to `Ractor#take` for old versions of Ruby. --------- https://github.com/ruby/stringio/commit/9954dabd80 Co-authored-by: Koichi Sasada <ko1@atdot.net> Co-authored-by: Sutou Kouhei <kou@clear-code.com>
This commit is contained in:
parent
c6c51569cb
commit
7d1190059f
@ -8,6 +8,10 @@ class TestStringIOInRactor < Test::Unit::TestCase
|
||||
|
||||
def test_ractor
|
||||
assert_in_out_err([], <<-"end;", ["true"], [])
|
||||
class Ractor
|
||||
alias value take unless method_defined? :value # compat with Ruby 3.4 and olders
|
||||
end
|
||||
|
||||
require "stringio"
|
||||
$VERBOSE = nil
|
||||
r = Ractor.new do
|
||||
|
Loading…
x
Reference in New Issue
Block a user