diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-01-07 11:38:51 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-01-07 11:38:51 +0900 |
commit | b176d4f52e4af67654814dab3e9c5f4bf9170e54 (patch) | |
tree | 51aa1f4095d2e067ea70c8b854e3e442c82fdc4d /enum.c | |
parent | e9593eb96715628edb0e5b2b5accdffd1d85187d (diff) |
[Bug #21008] Normalize before sum to float
After switching to `Float`-mode when summing `Numeric` objects,
normalization for `Float` is still needed.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12522
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4704,7 +4704,7 @@ sum_iter(VALUE i, struct enum_sum_memo *memo) } else switch (TYPE(memo->v)) { default: sum_iter_some_value(i, memo); return; - case T_FLOAT: sum_iter_Kahan_Babuska(i, memo); return; + case T_FLOAT: case T_FIXNUM: case T_BIGNUM: case T_RATIONAL: |