summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 13:52:22 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-09 13:52:22 +0000
commit9fcf2f8f4b64d9badf3d0c35f9913ad897cf4394 (patch)
treedc20dfcbd50500405b0aa0eb0a225a5a8ff00782 /rational.c
parentfa4e355e578afdd71bf45d51b3d6802d687287fd (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 'rational.c')
-rw-r--r--rational.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index 0cba54e281..a78b3202ec 100644
--- a/rational.c
+++ b/rational.c
@@ -1024,10 +1024,12 @@ nurat_expt(VALUE self, VALUE other)
/*
* call-seq:
- * rat <=> numeric -> -1, 0, +1 or nil
+ * rational <=> numeric -> -1, 0, +1 or nil
*
* Performs comparison and returns -1, 0, or +1.
*
+ * +nil+ is returned if the two values are incomparable.
+ *
* Rational(2, 3) <=> Rational(2, 3) #=> 0
* Rational(5) <=> 5 #=> 0
* Rational(2,3) <=> Rational(1,3) #=> 1