Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v3.0.19
Fetching contributors…

Cannot retrieve contributors at this time

9 lines (8 sloc) 0.231 kB
class Range
# Compare two ranges and see if they overlap each other
# (1..5).overlaps?(4..6) # => true
# (1..5).overlaps?(7..9) # => false
def overlaps?(other)
include?(other.first) || other.include?(first)
end
end
Jump to Line
Something went wrong with that request. Please try again.