diff options
author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2021-09-03 20:50:12 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-11 09:13:24 +0900 |
commit | 032534dbdf08c0912dffa482e29a491b8aa9276c (patch) | |
tree | 0ef482a3c7d764610ae9e3a0c737fa3133032de7 /enum.c | |
parent | 56065f0686e6798fff2ee7319f0f03026f427c13 (diff) |
Using RB_BIGNUM_TYPE_P macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4805
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } |