From 17401792fad0ac9a22067092cde9e4bfb1b0f0c7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 15:57:06 +0900 Subject: [PATCH] [ruby/etc] Alias value or join to take in old Ruby https://github.com/ruby/etc/commit/3dbe760bed --- test/etc/test_etc.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb index dc0d5c0fd8..51977e8f3d 100644 --- a/test/etc/test_etc.rb +++ b/test/etc/test_etc.rb @@ -178,6 +178,10 @@ class TestEtc < Test::Unit::TestCase omit "This test is flaky and intermittently failing now on ModGC workflow" if ENV['GITHUB_WORKFLOW'] == 'ModGC' assert_ractor(<<~RUBY, require: 'etc', timeout: 60) + class Ractor + alias join take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + 10.times.map do Ractor.new do 100.times do @@ -204,6 +208,10 @@ class TestEtc < Test::Unit::TestCase def test_ractor_unsafe assert_ractor(<<~RUBY, require: 'etc') + class Ractor + alias value take + end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders + r = Ractor.new do begin Etc.passwd