Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
Thread
/
Backtrace
/
Location
/
//opt/alt/ruby27/share/ri/system/Thread/Backtrace/Location/cdesc-Location.ri
U:RDoc::NormalClass[iI" Location:ETI" Thread::Backtrace::Location;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"?An object representation of a stack frame, initialized by ;TI"Kernel#caller_locations.;To:RDoc::Markup::BlankLine o; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I"# caller_locations.rb ;TI"def a(skip) ;TI" caller_locations(skip) ;TI" end ;TI"def b(skip) ;TI" a(skip) ;TI" end ;TI"def c(skip) ;TI" b(skip) ;TI" end ;TI" ;TI"c(0..2).map do |call| ;TI" puts call.to_s ;TI" end ;T:@format0o; ;[I"@Running <code>ruby caller_locations.rb</code> will produce:;T@o;;[I""caller_locations.rb:2:in `a' ;TI""caller_locations.rb:5:in `b' ;TI""caller_locations.rb:8:in `c' ;T;0o; ;[I"=Here's another example with a slightly different result:;T@o;;[I"# foo.rb ;TI"class Foo ;TI" attr_accessor :locations ;TI" def initialize(skip) ;TI"- @locations = caller_locations(skip) ;TI" end ;TI" end ;TI" ;TI"+Foo.new(0..2).locations.map do |call| ;TI" puts call.to_s ;TI" end ;T;0o; ;[I"9Now run <code>ruby foo.rb</code> and you should see:;T@o;;[I"init.rb:4:in `initialize' ;TI"init.rb:8:in `new' ;TI"init.rb:8:in `<main>';T;0: @fileI"vm_backtrace.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[ [;[ [;[[I"absolute_path;TI"vm_backtrace.c;T[I"base_label;T@_[I"inspect;T@_[I" label;T@_[I"lineno;T@_[I" path;T@_[I" to_s;T@_[ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[I" vm.c;TI"Thread::Backtrace;TcRDoc::NormalClass