From: Jacob Fugal Date: 2006-02-01T09:06:09+09:00 Subject: Re: [RCR] Numeric#of On 1/31/06, Matthew Moss wrote: > class Integer > def times > if block_given? > (0...self).each { |i| yield i } > else > (0...self) > end > end > end Yeah, that's pretty much the same thing as my pseudo-code if you let generator = (0...self) which, given the special implementation of Fixnum ranges, is probably the best solution. Note that it Matz probably did do it in Fixnum, not Numeric (How would you do something Math::PI.times? :) or Integer. Jacob Fugal