summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-19 13:34:51 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-19 13:34:51 +0000
commit2f491ea20267b93ec6b491c26001d9f8e5bf7008 (patch)
treebf717df3548e24fb0cbf5ab5a96b925f1920c2dc /time.c
parent33f7764bbfcad692bbfb9ca0edf4594f58a9be5a (diff)
merges r23075 from trunk into ruby_1_9_1.
-- * time.c (time_cmp): negate the result of reverse comparison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time.c b/time.c
index fe70b2d12f..32cb27257a 100644
--- a/time.c
+++ b/time.c
@@ -1109,7 +1109,7 @@ time_cmp(VALUE time1, VALUE time2)
cmp = rb_funcall(time2, rb_intern("<=>"), 1, time1);
if (NIL_P(cmp)) return Qnil;
- n = rb_cmpint(cmp, time1, time2);
+ n = -rb_cmpint(cmp, time1, time2);
if (n == 0) return INT2FIX(0);
if (n > 0) return INT2FIX(1);
return INT2FIX(-1);