End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Range#end
rng.end → obj
range.c
View on GitHub ↗
static VALUE
range_end(VALUE range)
{
return RANGE_END(range);
}
Returns the object that defines the end of the range.
Example
(1..10).end #=> 10 (1...10).end #=> 10