diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-26 16:35:18 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-26 16:35:18 +0000 |
commit | 29983664fcaecee6e92b269095398c56899e57ca (patch) | |
tree | 9374b0123dd0b232d254acdce1202e251f42f155 /time.c | |
parent | f0c0f504f4dfc0e8d5e806911fa6b238f18b42c0 (diff) |
* time.c (time_cmp): negate the result of reverse comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1113,7 +1113,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); |