Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Range#begin

rng.begin → obj

Returns the object that defines the beginning of the range.

Example
(1..10).begin   #=> 1
See also #as_json #bsearch #=== #count also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1