From: Robert Klemme Date: 2005-10-08T20:21:51+09:00 Subject: Re: "downto" the nitty-gritty zetetic wrote: > 1.downto(1) {|i| puts i} > => 1 > > 1.downto(2) {|i| puts i} > => 1 > > Is this right? The block is always executed once, even when the > limits would suggest otherwise? 1.upto(0) does the same thing... That's not true. You probably mixed output in IRB as #upto and #downto return self (i.e. 1 in your case): >> 1.downto(1) {|i| puts "x"} x => 1 >> 1.downto(2) {|i| puts "x"} => 1 >> 1.upto(0) {|i| puts "x"} => 1 Kind regards robert