Skip to content

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

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

  1. 3.1
See also .new .stat also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2