summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-23 03:35:38 (GMT)
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-23 03:35:38 (GMT)
commitc2204ca328817f3d87232471a4e1de0334425752 (patch)
treeb5489d0f829a520280292240aba2dc834f99af4f /rational.c
parent827e71bda54ffab6e2b2e0434b235c6190055cdb (diff)
* 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/trunk@39418 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 0cba54e..a78b320 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