D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
String
/
Filename :
upto-i.ri
back
Copy
U:RDoc::AnyMethod[iI" upto:ETI"String#upto;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"BWith a block given, calls the block with each +String+ value ;TI"2returned by successive calls to String#succ; ;TI"Kthe first value is +self+, the next is <tt>self.succ</tt>, and so on; ;TI"Cthe sequence terminates when value +other_string+ is reached; ;TI"returns +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"3'a8'.upto('b6') {|s| print s, ' ' } # => "a8" ;T:@format0o; ; [I"Output:;T@o;; [I" a8 a9 b0 b1 b2 b3 b4 b5 b6 ;T; 0o; ; [I"TIf argument +exclusive+ is given as a truthy object, the last value is omitted:;T@o;; [I"9'a8'.upto('b6', true) {|s| print s, ' ' } # => "a8" ;T; 0o; ; [I"Output:;T@o;; [I"a8 a9 b0 b1 b2 b3 b4 b5 ;T; 0o; ; [I"EIf +other_string+ would not be reached, does not call the block:;T@o;; [I""'25'.upto('5') {|s| fail s } ;TI""'aa'.upto('a') {|s| fail s } ;T; 0o; ; [I"3With no block given, returns a new Enumerator:;T@o;; [I"8'a8'.upto('b6') # => #<Enumerator: "a8":upto("b6")>;T; 0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"{upto(other_string, exclusive = false) {|string| ... } -> self upto(other_string, exclusive = false) -> new_enumerator ;T0[ I"(p1, p2 = v2);T@5FI"String;TcRDoc::NormalClass00