Skip to content

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

class method

Range.new

Range.new(begin, end, exclude_end=false) → rng

Constructs a range using the given begin and end. If the exclude_end parameter is omitted or is false, the range will include the end object; otherwise, it will be excluded.

See also .json_create #% #== also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1