Skip to content

Commit 8b1c313

Browse files
hsbtk0kubun
authored andcommitted
[ruby/etc] Alias value or join to take in old Ruby
ruby/etc@3dbe760bed
1 parent d226418 commit 8b1c313

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/etc/test_etc.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ def test_ractor_parallel
178178
omit "This test is flaky and intermittently failing now on ModGC workflow" if ENV['GITHUB_WORKFLOW'] == 'ModGC'
179179

180180
assert_ractor(<<~RUBY, require: 'etc', timeout: 60)
181+
class Ractor
182+
alias join take
183+
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
184+
181185
10.times.map do
182186
Ractor.new do
183187
100.times do
@@ -204,6 +208,10 @@ def test_ractor_parallel
204208

205209
def test_ractor_unsafe
206210
assert_ractor(<<~RUBY, require: 'etc')
211+
class Ractor
212+
alias value take
213+
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
214+
207215
r = Ractor.new do
208216
begin
209217
Etc.passwd

0 commit comments

Comments
 (0)