End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method · added in Ruby 3.1
TracePoint.allow_reentry
TracePoint.allow_reentry
trace_point.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/trace_point.rb, line 150
def self.allow_reentry
Primitive.tracepoint_allow_reentry
end
In general, while a TracePoint callback is running, other registered callbacks are not called to avoid confusion by reentrance. This method allows the reentrance in a given block. This method should be used carefully, otherwise the callback can be easily called infinitely.
If this method is called when the reentrance is already allowed, it raises a RuntimeError.
Ruby version changes
-
3.1
-
TracePoint.allow_reentryis added to allow reenter whileTracePointcallback. [Feature #15912]
-