From 032534dbdf08c0912dffa482e29a491b8aa9276c Mon Sep 17 00:00:00 2001 From: S-H-GAMELINKS Date: Fri, 3 Sep 2021 20:50:12 +0900 Subject: Using RB_BIGNUM_TYPE_P macro --- enum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'enum.c') diff --git a/enum.c b/enum.c index 4a4bb95113..b73e96b55a 100644 --- a/enum.c +++ b/enum.c @@ -848,7 +848,7 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op) n = 0; } } - else if (RB_TYPE_P(e, T_BIGNUM)) + else if (RB_BIGNUM_TYPE_P(e)) v = rb_big_plus(e, v); else goto not_integer; @@ -4173,8 +4173,8 @@ enum_sum(int argc, VALUE* argv, VALUE obj) if (RTEST(rb_range_values(obj, &beg, &end, &excl))) { if (!memo.block_given && !memo.float_value && - (FIXNUM_P(beg) || RB_TYPE_P(beg, T_BIGNUM)) && - (FIXNUM_P(end) || RB_TYPE_P(end, T_BIGNUM))) { + (FIXNUM_P(beg) || RB_BIGNUM_TYPE_P(beg)) && + (FIXNUM_P(end) || RB_BIGNUM_TYPE_P(end))) { return int_range_sum(beg, end, excl, memo.v); } } -- cgit v1.2.3