diff options
author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2021-08-31 20:30:35 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-05 23:01:27 +0900 |
commit | bdd6d8746f0a07b2c0cc3a6b387bf594569c0bb7 (patch) | |
tree | f11d32da65e227763d598d765765a76ddace1a0a /bignum.c | |
parent | 8f752c95d20134bcc0b5394f1cea723a40f1ac8c (diff) |
Replace RBOOL macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4791
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5471,10 +5471,10 @@ big_op(VALUE x, VALUE y, enum big_op_t op) n = FIX2INT(rel); switch (op) { - case big_op_gt: return n > 0 ? Qtrue : Qfalse; - case big_op_ge: return n >= 0 ? Qtrue : Qfalse; - case big_op_lt: return n < 0 ? Qtrue : Qfalse; - case big_op_le: return n <= 0 ? Qtrue : Qfalse; + case big_op_gt: return RBOOL(n > 0); + case big_op_ge: return RBOOL(n >= 0); + case big_op_lt: return RBOOL(n < 0); + case big_op_le: return RBOOL(n <= 0); } return Qundef; } @@ -5518,7 +5518,7 @@ VALUE rb_big_eq(VALUE x, VALUE y) { if (FIXNUM_P(y)) { - return bignorm(x) == y ? Qtrue : Qfalse; + return RBOOL(bignorm(x) == y); } else if (RB_BIGNUM_TYPE_P(y)) { } |