From 6aa80d5583daf71a4d45400af7e23e9d6151b1a3 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Thu, 7 Nov 2019 18:53:51 +0900 Subject: [PATCH] Use FIX2LONG instead of FIX2INT like 26843cbcd0 --- numeric.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/numeric.c b/numeric.c index da224de97a..87d9aeef54 100644 --- a/numeric.c +++ b/numeric.c @@ -1507,7 +1507,7 @@ rb_float_gt(VALUE x, VALUE y) if (RB_TYPE_P(y, T_FIXNUM) || RB_TYPE_P(y, T_BIGNUM)) { VALUE rel = rb_integer_float_cmp(y, x); if (FIXNUM_P(rel)) - return -FIX2INT(rel) > 0 ? Qtrue : Qfalse; + return -FIX2LONG(rel) > 0 ? Qtrue : Qfalse; return Qfalse; } else if (RB_TYPE_P(y, T_FLOAT)) { @@ -1544,7 +1544,7 @@ flo_ge(VALUE x, VALUE y) if (RB_TYPE_P(y, T_FIXNUM) || RB_TYPE_P(y, T_BIGNUM)) { VALUE rel = rb_integer_float_cmp(y, x); if (FIXNUM_P(rel)) - return -FIX2INT(rel) >= 0 ? Qtrue : Qfalse; + return -FIX2LONG(rel) >= 0 ? Qtrue : Qfalse; return Qfalse; } else if (RB_TYPE_P(y, T_FLOAT)) { @@ -1581,7 +1581,7 @@ flo_lt(VALUE x, VALUE y) if (RB_TYPE_P(y, T_FIXNUM) || RB_TYPE_P(y, T_BIGNUM)) { VALUE rel = rb_integer_float_cmp(y, x); if (FIXNUM_P(rel)) - return -FIX2INT(rel) < 0 ? Qtrue : Qfalse; + return -FIX2LONG(rel) < 0 ? Qtrue : Qfalse; return Qfalse; } else if (RB_TYPE_P(y, T_FLOAT)) { @@ -1618,7 +1618,7 @@ flo_le(VALUE x, VALUE y) if (RB_TYPE_P(y, T_FIXNUM) || RB_TYPE_P(y, T_BIGNUM)) { VALUE rel = rb_integer_float_cmp(y, x); if (FIXNUM_P(rel)) - return -FIX2INT(rel) <= 0 ? Qtrue : Qfalse; + return -FIX2LONG(rel) <= 0 ? Qtrue : Qfalse; return Qfalse; } else if (RB_TYPE_P(y, T_FLOAT)) {