Flowdock
upto(p1) public

Iterates through successive values, starting at str and ending at other_str inclusive, passing each value in turn to the block. The String#succ method is used to generate each value.

   "a8".upto("b6") {|s| print s, ' ' }
   for s in "a8".."b6"
     print s, ' '
   end

produces:

   a8 a9 b0 b1 b2 b3 b4 b5 b6
   a8 a9 b0 b1 b2 b3 b4 b5 b6
Show source
Register or log in to add new notes.