Possible Duplicate:
How to iterate through an array starting from the last element? (Ruby)
I am trying to iterate over a list in reverse, but I have not been able to figure it out.
Here is my code:
#!/usr/bin/ruby
presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"]
for ss in -presidents.length...0
print ": ", presidents[ss], "\n";
end
use reverse_each