Daniel,
If I have r = Range.new(0,50,true), shouldn't r.end return 49
and not 50? I am confused by this.
No, Range#end returns the object that defines the end of the range,
whether or not the range actually includes that object. For
justification, think about how to handle "((0.0)...(1.0)).end".
ri Range#end
-------------------------------------------------------------- Range#end
rng.end => obj
rng.last => obj
···
------------------------------------------------------------------------
Returns the object that defines the end of _rng_.
(1..10).end #=> 10
(1...10).end #=> 10
I hope this helps.
- Warren Brown