summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-28 05:01:29 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-28 05:01:29 +0000
commitea1b7a95777fb5ca231dbc54c38d3b5fb61abd19 (patch)
tree04b60d337e6380e49d2620f1922e93221b0a8c4e /compar.c
parent20a2b656c2cbaac6585cf8bf7b8b4f37ad7877ba (diff)
* time.c: rdoc fix for <=>
* array.c: ditto * bignum.c: ditto * compar.c: ditto * file.c: ditto * numeric.c: ditto * string.c: rdoc fix for <=> and casecmp git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/compar.c b/compar.c
index 8f3f83e40e..3903ec32d1 100644
--- a/compar.c
+++ b/compar.c
@@ -196,7 +196,9 @@ cmp_between(x, min, max)
* may be ordered. The class must define the <code><=></code> operator,
* which compares the receiver against another object, returning -1, 0,
* or +1 depending on whether the receiver is less than, equal to, or
- * greater than the other object. <code>Comparable</code> uses
+ * greater than the other object. If the other object is not comparable
+ * then the <code><=></code> operator should return nil.
+ * <code>Comparable</code> uses
* <code><=></code> to implement the conventional comparison operators
* (<code><</code>, <code><=</code>, <code>==</code>, <code>>=</code>,
* and <code>></code>) and the method <code>between?</code>.