Ruby 1.9.2 Reference Manual > All Libraries > Builtin Library > class Integer > upto
upto(max) {|n| ... } -> Fixnum | Bignumupto(max) -> Enumeratorself から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。
[SEE_ALSO] Integer#downto, Numeric#step, Integer#times