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 ruby caller_locations.rb
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 ruby foo.rb
and you should see:;T@o;;[I"init.rb:4:in `initialize'
;TI"init.rb:8:in `new'
;TI"init.rb:8:in `';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