From: Vasyl Smirnov Date: 2007-10-25T20:12:28+09:00 Subject: Re: Smallest peeve ever! On Oct 25, 10:25 am, "Just Another Victim of the Ambient Morality" wrote: > I'm sure there's no chance of this ever changing but I'm disappointed > that the integer method "step": > > start.step(end, step_size) > > ...wasn't more like: > > step_size.step(start, end) > > ...I just like having the start and end points grouped together with the > step size singled out. > Who's with me? You can help yourself :) class Numeric def mystep(from, to, &block) raise ArgumentError unless block_given? from.step(to, self) { |x| yield x } end end 5.step(10, 2) { |i| puts i } 2.mystep(5, 10) { |i| puts i }