From 7d1190059fa872f1a6c2f51fde8c1971b8c2bcaf Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 16:44:29 +0900 Subject: [PATCH] [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 Co-authored-by: Sutou Kouhei --- test/stringio/test_ractor.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/stringio/test_ractor.rb b/test/stringio/test_ractor.rb index 489bb8c0e4..6acf53fb0a 100644 --- a/test/stringio/test_ractor.rb +++ b/test/stringio/test_ractor.rb @@ -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