D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Integer
/
Filename :
upto-i.ri
back
Copy
U:RDoc::AnyMethod[iI" upto:ETI"Integer#upto;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"NCalls the given block with each integer value from +self+ up to +limit+; ;TI"returns +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"a = [] ;TI"25.upto(10) {|i| a << i } # => 5 ;TI"Da # => [5, 6, 7, 8, 9, 10] ;TI"a = [] ;TI"3-5.upto(0) {|i| a << i } # => -5 ;TI"Ha # => [-5, -4, -3, -2, -1, 0] ;TI"25.upto(4) {|i| fail 'Cannot happen' } # => 5 ;T:@format0o; ; [I"0With no block given, returns an Enumerator.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Jupto(limit) {|i| ... } -> self upto(limit) -> enumerator ;T0[ I" (p1);T@FI"Integer;TcRDoc::NormalClass00