struct

Range(B, E)

Inherits Iterable < Enumerable < Struct < Value < Object

https://github.com/crystal-lang/crystal/pull/17081

Instance methods

overlaps?(other : Range) : Bool

Returns true if this range and other have at least one value in common.

(1..5).overlaps?(5..10)  # => true
(1...5).overlaps?(5..10) # => false
(1...1).overlaps?(1..1)  # => false
Source