D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Enumerable
/
Filename :
reverse_each-i.ri
back
Copy
U:RDoc::AnyMethod[iI"reverse_each:ETI"Enumerable#reverse_each;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"<With a block given, calls the block with each element, ;TI"*but in reverse order; returns +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"a = [] ;TI"A(1..4).reverse_each {|element| a.push(-element) } # => 1..4 ;TI"a # => [-4, -3, -2, -1] ;TI" ;TI"a = [] ;TI";%w[a b c d].reverse_each {|element| a.push(element) } ;TI"# => ["a", "b", "c", "d"] ;TI"!a # => ["d", "c", "b", "a"] ;TI" ;TI"a = [] ;TI"1h.reverse_each {|element| a.push(element) } ;TI"&# => {:foo=>0, :bar=>1, :baz=>2} ;TI".a # => [[:baz, 2], [:bar, 1], [:foo, 0]] ;T:@format0o; ; [I"0With no block given, returns an Enumerator.;T: @fileI"enum.c;T:0@omit_headings_from_table_of_contents_below0I"greverse_each(*args) {|element| ... } -> self reverse_each(*args) -> enumerator ;T0[ I"(*args);T@"FI"Enumerable;TcRDoc::NormalModule00