mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
Using RB_BIGNUM_TYPE_P macro
This commit is contained in:
parent
56065f0686
commit
032534dbdf
Notes:
git
2021-09-11 09:13:46 +09:00
15 changed files with 104 additions and 107 deletions
4
array.c
4
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue