From d226287855800e1eec58cd35ed3aac5cd9fbf630 Mon Sep 17 00:00:00 2001
From: Xavier Noria <fxn@hashref.com>
Date: Sun, 25 Oct 2009 20:50:36 +0100
Subject: AS guide: documents the Range#overlaps?

---
 railties/guides/source/active_support_core_extensions.textile | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'railties/guides/source/active_support_core_extensions.textile')

diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 7155cb9a79..2df46a332f 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1668,6 +1668,16 @@ Active Support extends this method so that the argument may be another range in
 
 WARNING: The orginal +Range#include?+ is still the one aliased to +Range#===+.
 
+h4. +overlaps?+
+
+The method +Range#overlaps?+ says whether any two given ranges have non-void intersection:
+
+<ruby>
+(1..10).overlaps?(7..11)  # => true
+(1..10).overlaps?(0..7)   # => true
+(1..10).overlaps?(11..27) # => false
+</ruby>
+
 h3. Extensions to +Proc+
 
 ...
-- 
cgit v1.2.3

