⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Module
/
View File Name :
const_source_location-i.ri
U:RDoc::AnyMethod[iI"const_source_location:ETI"!Module#const_source_location;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"PReturns the Ruby source filename and line number containing the definition ;TI"Wof the constant specified. If the named constant is not found, +nil+ is returned. ;TI"LIf the constant is found, but its source location can not be extracted ;TI">(constant is defined in C code), empty array is returned.;To:RDoc::Markup::BlankLine o; ; [I"Q_inherit_ specifies whether to lookup in
mod.ancestors
(+true+ ;TI"by default).;T@o:RDoc::Markup::Verbatim; [(I"# test.rb: ;TI"class A # line 1 ;TI" C1 = 1 ;TI" C2 = 2 ;TI" end ;TI" ;TI"module M # line 6 ;TI" C3 = 3 ;TI" end ;TI" ;TI"class B < A # line 10 ;TI" include M ;TI" C4 = 4 ;TI" end ;TI" ;TI",class A # continuation of A definition ;TI": C2 = 8 # constant redefinition; warned yet allowed ;TI" end ;TI" ;TI"Dp B.const_source_location('C4') # => ["test.rb", 12] ;TI"Cp B.const_source_location('C3') # => ["test.rb", 7] ;TI"Cp B.const_source_location('C1') # => ["test.rb", 2] ;TI" ;TI"Vp B.const_source_location('C3', false) # => nil -- don't lookup in ancestors ;TI" ;TI"fp A.const_source_location('C2') # => ["test.rb", 16] -- actual (last) definition place ;TI" ;TI"yp Object.const_source_location('B') # => ["test.rb", 10] -- top-level constant could be looked through Object ;TI"wp Object.const_source_location('A') # => ["test.rb", 1] -- class reopening is NOT considered new definition ;TI" ;TI"fp B.const_source_location('A') # => ["test.rb", 1] -- because Object is in ancestors ;TI"p M.const_source_location('A') # => ["test.rb", 1] -- Object is not ancestor, but additionally checked for modules ;TI" ;TI"\p Object.const_source_location('A::C1') # => ["test.rb", 2] -- nesting is supported ;TI"Xp Object.const_source_location('String') # => [] -- constant is defined in C code;T:@format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"ˆmod.const_source_location(sym, inherit=true) -> [String, Integer] mod.const_source_location(str, inherit=true) -> [String, Integer] ;T0[ I"(*args);T@;FI"Module;TcRDoc::NormalClass00