End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Range#end
self.end → object
range.c
View on GitHub ↗
static VALUE
range_end(VALUE range)
{
return RANGE_END(range);
}
Returns the object that defines the end of self.
Example
(1..4).end # => 4 (1...4).end # => 4 (1..).end # => nil
Related: Range#begin, Range#last.