downto(min) {|n| ... } -> self[permalink][rdoc][edit]downto(min) -> Enumerator-
selfからminまで1ずつ減らしながらブロックを繰り返し実行します。self < minであれば何もしません。- [PARAM]
min: - 数値
- [RETURN]
-
selfを返します。
2.downto(-1) { |i| p i } # => 2 # 1 # 0 # -1[SEE_ALSO] Integer#upto, Numeric#step, Integer#times
- [PARAM]