PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
ObjectSpace
U:RDoc::AnyMethod[iI"each_object:ETI"ObjectSpace::each_object;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"GCalls the block once for each living, nonimmediate object in this ;TI"BRuby process. If <i>module</i> is specified, calls the block ;TI"Ifor only those classes or modules that match (or are a subclass of) ;TI"C<i>module</i>. Returns the number of objects found. Immediate ;TI"9objects (<code>Fixnum</code>s, <code>Symbol</code>s ;TI"F<code>true</code>, <code>false</code>, and <code>nil</code>) are ;TI"Enever returned. In the example below, #each_object returns both ;TI"Fthe numbers we defined and several constants defined in the Math ;TI"module.;To:RDoc::Markup::BlankLine o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I"a = 102.7 ;TI"&b = 95 # Won't be returned ;TI"c = 12345678987654321 ;TI"9count = ObjectSpace.each_object(Numeric) {|x| p x } ;TI""puts "Total count: #{count}" ;T:@format0o; ; [I"<em>produces:</em>;T@o;; [ I"12345678987654321 ;TI"102.7 ;TI"2.71828182845905 ;TI"3.14159265358979 ;TI"2.22044604925031e-16 ;TI"1.7976931348623157e+308 ;TI"2.2250738585072e-308 ;TI"Total count: 7;T; 0: @fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"ObjectSpace.each_object([module]) {|obj| ... } -> integer ObjectSpace.each_object([module]) -> an_enumerator ;T0[ I"(*args);T@.FI"ObjectSpace;TcRDoc::NormalModule00
[-] trace_object_allocations_stop-c.ri
[edit]
[-] define_finalizer-c.ri
[edit]
[-] reachable_objects_from_root-c.ri
[edit]
[+]
WeakMap
[-] allocation_class_path-c.ri
[edit]
[-] count_imemo_objects-c.ri
[edit]
[-] dump_shapes-i.ri
[edit]
[-] internal_super_of-c.ri
[edit]
[-] garbage_collect-i.ri
[edit]
[-] allocation_sourceline-c.ri
[edit]
[-] count_symbols-c.ri
[edit]
[-] reachable_objects_from-c.ri
[edit]
[-] count_nodes-c.ri
[edit]
[-] count_objects-c.ri
[edit]
[-] trace_object_allocations_start-c.ri
[edit]
[-] cdesc-ObjectSpace.ri
[edit]
[+]
InternalObjectWrapper
[-] trace_object_allocations-c.ri
[edit]
[-] dump-i.ri
[edit]
[-] memsize_of-c.ri
[edit]
[+]
..
[-] allocation_method_id-c.ri
[edit]
[-] dump_all-i.ri
[edit]
[-] allocation_generation-c.ri
[edit]
[-] trace_object_allocations_clear-c.ri
[edit]
[-] memsize_of_all-c.ri
[edit]
[+]
WeakKeyMap
[-] trace_object_allocations_debug_start-c.ri
[edit]
[-] internal_class_of-c.ri
[edit]
[-] count_tdata_objects-c.ri
[edit]
[-] each_object-c.ri
[edit]
[-] garbage_collect-c.ri
[edit]
[-] allocation_sourcefile-c.ri
[edit]
[-] undefine_finalizer-c.ri
[edit]
[-] count_objects_size-c.ri
[edit]