| Server IP : 162.214.74.102 / Your IP : 216.73.216.252 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Thread/Backtrace/Location/ |
Upload File : |
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