diff options
-rw-r--r-- | array.c | 2 | ||||
-rw-r--r-- | bignum.c | 2 | ||||
-rw-r--r-- | compar.c | 4 | ||||
-rw-r--r-- | file.c | 2 | ||||
-rw-r--r-- | numeric.c | 4 | ||||
-rw-r--r-- | string.c | 4 | ||||
-rw-r--r-- | time.c | 7 |
7 files changed, 12 insertions, 13 deletions
@@ -2823,7 +2823,7 @@ recursive_cmp(ary1, ary2, recur) /* * call-seq: - * array <=> other_array -> -1, 0, +1 + * array <=> other_array -> -1, 0, +1 or nil * * Comparison---Returns an integer (-1, 0, * or +1) if this array is less than, equal to, or greater than @@ -986,7 +986,7 @@ rb_big_to_f(x) /* * call-seq: - * big <=> numeric => -1, 0, +1 + * big <=> numeric => -1, 0, +1 or nil * * Comparison---Returns -1, 0, or +1 depending on whether <i>big</i> is * less than, equal to, or greater than <i>numeric</i>. This is the @@ -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>. @@ -187,7 +187,7 @@ get_stat(self) /* * call-seq: - * stat <=> other_stat => -1, 0, 1 + * stat <=> other_stat => -1, 0, +1 or nil * * Compares <code>File::Stat</code> objects by comparing their * respective modification times. @@ -914,7 +914,7 @@ rb_dbl_cmp(a, b) /* * call-seq: - * flt <=> numeric => -1, 0, +1 + * flt <=> numeric => -1, 0, +1 or nil * * Returns -1, 0, or +1 depending on whether <i>flt</i> is less than, * equal to, or greater than <i>numeric</i>. This is the basis for the @@ -2423,7 +2423,7 @@ fix_equal(x, y) /* * call-seq: - * fix <=> numeric => -1, 0, +1 + * fix <=> numeric => -1, 0, +1 or nil * * Comparison---Returns -1, 0, or +1 depending on whether <i>fix</i> is * less than, equal to, or greater than <i>numeric</i>. This is the @@ -1031,7 +1031,7 @@ rb_str_eql(str1, str2) /* * call-seq: - * str <=> other_str => -1, 0, +1 + * str <=> other_str => -1, 0, +1 or nil * * Comparison---Returns -1 if <i>other_str</i> is greater than, 0 if * <i>other_str</i> is equal to, and +1 if <i>other_str</i> is less than @@ -1085,7 +1085,7 @@ rb_str_cmp_m(str1, str2) /* * call-seq: - * str.casecmp(other_str) => -1, 0, +1 + * str.casecmp(other_str) => -1, 0, +1 or nil * * Case-insensitive version of <code>String#<=></code>. * @@ -950,12 +950,9 @@ time_usec(time) /* * call-seq: - * time <=> other_time => -1, 0, +1 - * time <=> numeric => -1, 0, +1 + * time <=> other_time => -1, 0, +1 or nil * - * Comparison---Compares <i>time</i> with <i>other_time</i> or with - * <i>numeric</i>, which is the number of seconds (possibly - * fractional) since epoch. + * Comparison---Compares <i>time</i> with <i>other_time</i>. * * t = Time.now #=> Wed Apr 09 08:56:03 CDT 2003 * t2 = t + 2592000 #=> Fri May 09 08:56:03 CDT 2003 |