aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorShigeya Suzuki <shigeya@wide.ad.jp>2012-02-09 22:08:28 -0800
committerShigeya Suzuki <shigeya@wide.ad.jp>2012-02-09 22:08:28 -0800
commit6f68e632746f72469cbd1c1b6cb9d3f1ed1730a0 (patch)
treefbef94df48e7bab274826ad24fa9f278b8c5db99 /activesupport/lib/active_support/core_ext
parent75ffd8701d04d943eddcafee08e19b90bce8936c (diff)
downloadrails-6f68e632746f72469cbd1c1b6cb9d3f1ed1730a0.tar.gz
rails-6f68e632746f72469cbd1c1b6cb9d3f1ed1730a0.tar.bz2
rails-6f68e632746f72469cbd1c1b6cb9d3f1ed1730a0.zip
make Range#overlaps? accept Range of Time
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/range/overlaps.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/range/overlaps.rb b/activesupport/lib/active_support/core_ext/range/overlaps.rb
index 7df653b53f..603657c180 100644
--- a/activesupport/lib/active_support/core_ext/range/overlaps.rb
+++ b/activesupport/lib/active_support/core_ext/range/overlaps.rb
@@ -3,6 +3,6 @@ class Range
# (1..5).overlaps?(4..6) # => true
# (1..5).overlaps?(7..9) # => false
def overlaps?(other)
- include?(other.first) || other.include?(first)
+ cover?(other.first) || other.cover?(first)
end
end