On Oct 12, 12:42 pm, mortee <mortee.li... / kavemalna.hu> wrote:
> Brian Adkins wrote:
> > Actually, what you want is simply N. It's a nonsensical request from a
> > troll. Using max, end, last, etc. to find the end of the range is
> > ridiculous since you must know the end of the range to define the
> > range!
>
> Ehhh... it's actually quite probable that the OP was indeed just insult
> - however, you all seem to assume that the same person provides both the
> range and wants to know its max.

I think you're assuming we're assuming :) Rather than put words into
the OP's mouth with respect to the scope of the range problem he's
allegedly trying to solve, I was referring specifically to an integer
range problem only - can't speak for everyone though.

With respect to an integer range, a combination of Range#end and
Range#exclude_end?