Skip to content

Commit f9bffff

Browse files
committed
remove Ractor#take
[Feature #21262]
1 parent ed0ffcd commit f9bffff

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

bootstraptest/test_ractor.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,22 +2327,6 @@ def initialize(a)
23272327
}.tally.sort
23282328
}
23292329

2330-
# Ractor#take will warn for compatibility.
2331-
# This method will be removed after 2025/09/01
2332-
assert_equal "2", %q{
2333-
raise "remove Ractor#take and this test" if Time.now > Time.new(2025, 9, 2)
2334-
$VERBOSE = true
2335-
r = Ractor.new{42}
2336-
$msg = []
2337-
def Warning.warn(msg)
2338-
$msg << msg
2339-
end
2340-
r.take
2341-
r.take
2342-
raise unless $msg.all?{/Ractor#take/ =~ it}
2343-
$msg.size
2344-
}
2345-
23462330
# Cause lots of inline CC misses.
23472331
assert_equal 'ok', <<~'RUBY'
23482332
class A; def test; 1 + 1; end; end

ractor.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,6 @@ def value
575575
__builtin_ractor_value
576576
end
577577

578-
# keep it for compatibility
579-
def take
580-
Kernel.warn("Ractor#take was deprecated and use Ractor#value instead. This method will be removed after the end of Aug 2025", uplevel: 0)
581-
self.value
582-
end
583-
584578
#
585579
# call-seq:
586580
# ractor.monitor(port) -> self

0 commit comments

Comments
 (0)