Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method · added in Ruby 3.2
Thread.each_caller_location
Thread.each_caller_location{ |loc| ... } → nil
vm_backtrace.c
View on GitHub ↗
static VALUE
each_caller_location(VALUE unused)
{
rb_ec_partial_backtrace_object(GET_EC(), 2, ALL_BACKTRACE_LINES, NULL, FALSE, TRUE);
return Qnil;
}
Yields each frame of the current execution stack as a backtrace location object.
Ruby version changes
-
3.2
-
Thread.each_caller_locationis added. [Feature #16663]
-