How can I write a loop in Ruby that counts down, similar to the following C-style for loop?
for
for (i = 25; i >= 0; i--) { print i; }
Just in case you are working with a range already:
rng = 0..6 rng.reverse_each { |i| p i }
EDIT - more succinctly:
puts(rng.to_a.reverse)