Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
String
/
//opt/alt/ruby27/share/ri/system/String/upto-i.ri
U:RDoc::AnyMethod[iI" upto:ETI"String#upto;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"DIterates through successive values, starting at <i>str</i> and ;TI"Fending at <i>other_str</i> inclusive, passing each value in turn ;TI"Cto the block. The String#succ method is used to generate each ;TI"Dvalue. If optional second argument exclusive is omitted or is ;TI"Bfalse, the last value will be included; otherwise it will be ;TI"excluded.;To:RDoc::Markup::BlankLine o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [ I")"a8".upto("b6") {|s| print s, ' ' } ;TI"for s in "a8".."b6" ;TI" print s, ' ' ;TI" end ;T:@format0o; ; [I"<em>produces:</em>;T@o;; [I" a8 a9 b0 b1 b2 b3 b4 b5 b6 ;TI" a8 a9 b0 b1 b2 b3 b4 b5 b6 ;T; 0o; ; [I"PIf <i>str</i> and <i>other_str</i> contains only ascii numeric characters, ;TI"Gboth are recognized as decimal numbers. In addition, the width of ;TI":string (e.g. leading zeros) is handled appropriately.;T@o;; [I"1"9".upto("11").to_a #=> ["9", "10", "11"] ;TI"""25".upto("5").to_a #=> [] ;TI"="07".upto("11").to_a #=> ["07", "08", "09", "10", "11"];T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"�str.upto(other_str, exclusive=false) {|s| block } -> str str.upto(other_str, exclusive=false) -> an_enumerator ;T0[ I"(p1, p2 = v2);T@.FI"String;TcRDoc::NormalClass00