Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Thread#backtrace_locations

thread.backtrace_locations(*args) → array or nil

Returns the execution stack for the target thread—an array containing backtrace location objects.

See Thread::Backtrace::Location for more information.

This method behaves similarly to Kernel#caller_locations except it applies to a specific thread.

See also #backtrace #exit #alive? #fetch also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0