Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > library _builtin > class Integer > upto

instance method Integer#upto

upto(max) {|n| ... } -> Fixnum | Bignum
upto(max) -> Enumerable::Enumerator

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

[PARAM] max:
数値
[RETURN]
self を返します。

[SEE_ALSO] Integer#downto, Integer#step, Integer#times