Method: Thread::Backtrace::Location#label
- Defined in:
- vm_backtrace.c
#label ⇒ Object
Returns the label of this frame.
Usually consists of method, class, module, etc names with decoration.
Consider the following example:
def foo
puts caller_locations(0).first.label
1.times do
puts caller_locations(0).first.label
1.times do
puts caller_locations(0).first.label
end
end
end
The result of calling foo is this:
foo block in foo block (2 levels) in foo
324 325 326 327 328 |
# File 'vm_backtrace.c', line 324
static VALUE
location_label_m(VALUE self)
{
return location_label(location_ptr(self));
}
|