| Server IP : 162.214.74.102 / Your IP : 216.73.217.61 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/ObjectSpace/ |
Upload File : |
U:RDoc::AnyMethod[iI"reachable_objects_from:ETI"(ObjectSpace::reachable_objects_from;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I"-Return all reachable objects from `obj'.;To:RDoc::Markup::BlankLine o;; [I":This method returns all reachable objects from `obj'.;T@o;; [I"OIf `obj' has two or more references to the same object `x', then returned ;TI"(array only includes one `x' object.;T@o;; [I"KIf `obj' is a non-markable (non-heap management) object such as true, ;TI"Mfalse, nil, symbols and Fixnums (and Flonum) then it simply returns nil.;T@o;; [ I"QIf `obj' has references to an internal object, then it returns instances of ;TI"PObjectSpace::InternalObjectWrapper class. This object contains a reference ;TI"Nto an internal object and you can check the type of internal object with ;TI"`type' method.;T@o;; [I"QIf `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this ;TI"Kmethod returns all reachable object from an internal object, which is ;TI"pointed by `obj'.;T@o;; [I"1With this method, you can find memory leaks.;T@o;; [I"=This method is only expected to work except with C Ruby.;T@o;; [I" Example:;To:RDoc::Markup::Verbatim; [I"9ObjectSpace.reachable_objects_from(['a', 'b', 'c']) ;TI" #=> [Array, 'a', 'b', 'c'] ;TI" ;TI"9ObjectSpace.reachable_objects_from(['a', 'a', 'a']) ;TI"K#=> [Array, 'a', 'a', 'a'] # all 'a' strings have different object id ;TI" ;TI"9ObjectSpace.reachable_objects_from([v = 'a', v, v]) ;TI"#=> [Array, 'a'] ;TI" ;TI"+ObjectSpace.reachable_objects_from(1) ;TI"6#=> nil # 1 is not markable (heap managed) object;T:@format0: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"=ObjectSpace.reachable_objects_from(obj) -> array or nil ;T0[ I" (p1);T@AFI"ObjectSpace;TcRDoc::NormalModule00