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 --- array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'array.c') diff --git a/array.c b/array.c index 66dc5253a0..20ed970713 100644 --- a/array.c +++ b/array.c @@ -7803,7 +7803,7 @@ rb_ary_sum(int argc, VALUE *argv, VALUE ary) n = 0; } } - else if (RB_TYPE_P(e, T_BIGNUM)) + else if (RB_BIGNUM_TYPE_P(e)) v = rb_big_plus(e, v); else if (RB_TYPE_P(e, T_RATIONAL)) { if (r == Qundef) @@ -7840,7 +7840,7 @@ rb_ary_sum(int argc, VALUE *argv, VALUE ary) x = RFLOAT_VALUE(e); else if (FIXNUM_P(e)) x = FIX2LONG(e); - else if (RB_TYPE_P(e, T_BIGNUM)) + else if (RB_BIGNUM_TYPE_P(e)) x = rb_big2dbl(e); else if (RB_TYPE_P(e, T_RATIONAL)) x = rb_num2dbl(e); -- cgit v1.2.3