summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-23 03:35:38 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-23 03:35:38 +0000
commitc2204ca328817f3d87232471a4e1de0334425752 (patch)
treeb5489d0f829a520280292240aba2dc834f99af4f /time.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 'time.c')
-rw-r--r--time.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/time.c b/time.c
index 765dc31194..77cac95621 100644
--- a/time.c
+++ b/time.c
@@ -3334,10 +3334,12 @@ time_subsec(VALUE time)
* call-seq:
* time <=> other_time -> -1, 0, +1 or nil
*
- * Comparison---Compares _time_ with +other_time+.
- * The return value is ++1+ if _time_ is greater than
- * +other_time+, +0+ if _time_ is equal to +other_time+ and
- * +-1+ if _time_ is smaller than +other_time+.
+ * Comparison---Compares +time+ with +other_time+.
+ *
+ * -1, 0, +1 or nil depending on whether +time+ is less than, equal to, or
+ * greater than +other_time+.
+ *
+ * +nil+ is returned if the two values are incomparable.
*
* t = Time.now #=> 2007-11-19 08:12:12 -0600
* t2 = t + 2592000 #=> 2007-12-19 08:12:12 -0600