On Oct 13, 12:02 am, "ara.t.howard" <ara.t.how... / gmail.com> wrote:
> On Oct 12, 2007, at 9:05 PM, Brian Adkins wrote:
>
>
>
> > D'oh! Old code failed for (0...0)
>
> > class Range
> >   alias orig_max max
> >   def max
> >     if ( self.begin.kind_of?(Integer) &&
> >          self.end.kind_of?(Integer) &&
> >          ( self.exclude_end? ?
> >             self.begin < self.end :
> >             self.begin <= self.end ) )
> >       self.exclude_end? ? self.end - 1 : self.end
> >     else
> >       orig_max
> >     end
> >   end
> > end
>
> p ( -1 .. -4 ).max
>
> ;-)

Are you complaining about my version of max or the built in? I can't
tell because the results are identical ;)