Skip to content
instance method

Thread::Backtrace::Location#path

() -> ::String?
path

Returns the file name of this frame. This will generally be an absolute path, unless the frame is in the main script, in which case it will be the script location passed on the command line.

For example, using caller_locations.rb from Thread::Backtrace::Location

Example
loc = c(0..1).first
loc.path #=> caller_locations.rb
See also #lineno #to_s #label also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0