From c2204ca328817f3d87232471a4e1de0334425752 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 23 Feb 2013 03:35:38 +0000 Subject: * 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 --- time.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'time.c') 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 -- cgit v1.2.3