diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-09 13:52:22 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-09 13:52:22 +0000 |
commit | 9fcf2f8f4b64d9badf3d0c35f9913ad897cf4394 (patch) | |
tree | dc20dfcbd50500405b0aa0eb0a225a5a8ff00782 /numeric.c | |
parent | fa4e355e578afdd71bf45d51b3d6802d687287fd (diff) |
merge revision(s) 39418:
* array.c: Document #<=> return values and formatting
* bignum.c: ditto
* file.c: ditto
* object.c: ditto
* numeric.c: ditto
* rational.c: ditto
* string.c: ditto
* time.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -1032,10 +1032,10 @@ num_eql(VALUE x, VALUE y) /* * call-seq: - * num <=> other -> 0 or nil + * number <=> other -> 0 or nil * - * Returns zero if <i>num</i> equals <i>other</i>, <code>nil</code> - * otherwise. + * Returns zero if +number+ equals +other+, otherwise +nil+ is returned if the + * two values are incomparable. */ static VALUE @@ -1123,13 +1123,15 @@ rb_dbl_cmp(double a, double b) /* * call-seq: - * flt <=> real -> -1, 0, +1 or nil + * float <=> real -> -1, 0, +1 or nil + * + * Returns -1, 0, +1 or nil depending on whether +float+ is less than, equal + * to, or greater than +real+. This is the basis for the tests in Comparable. * - * Returns -1, 0, +1 or nil depending on whether <i>flt</i> is less - * than, equal to, or greater than <i>real</i>. This is the basis for - * the tests in <code>Comparable</code>. * The result of <code>NaN <=> NaN</code> is undefined, so the * implementation-dependent value is returned. + * + * +nil+ is returned if the two values are incomparable. */ static VALUE @@ -3036,10 +3038,11 @@ fix_equal(VALUE x, VALUE y) * call-seq: * fix <=> numeric -> -1, 0, +1 or nil * - * Comparison---Returns -1, 0, +1 or nil depending on whether - * <i>fix</i> is less than, equal to, or greater than - * <i>numeric</i>. This is the basis for the tests in - * <code>Comparable</code>. + * Comparison---Returns -1, 0, +1 or nil depending on whether +fix+ is less + * than, equal to, or greater than +numeric+. This is the basis for the tests + * in Comparable. + * + * +nil+ is returned if the two values are incomparable. */ static VALUE |