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 module is specified, calls the block ;TI"Ifor only those classes or modules that match (or are a subclass of) ;TI"Cmodule. Returns the number of objects found. Immediate ;TI"9objects (Fixnum
s, Symbol
s ;TI"Ftrue
, false
, and nil
) are ;TI"Dnever returned. In the example below, each_object
;TI"Jreturns both the numbers we defined and several constants defined in ;TI""the Math
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"produces:;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"(p1 = v1);T@.FI"ObjectSpace;TcRDoc::NormalModule00