Skip to content
instance method

Range#end

() -> Elem
self.end → object

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.

See also #each #entries #cover? #eql? also in 3.4 · 3.3 · 3.2 · 3.1 · 3.0