diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-23 14:38:24 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-11-10 11:14:15 +0900 |
commit | b958e2add835d62c0a62edaf9a23ecbbd70a3635 (patch) | |
tree | 13a6f53e0fd2b6aae77d4ee7e206c2d8bc346f30 /array.c | |
parent | 8b3653b484a1130987c6b774c71e69a4a64a4f27 (diff) | |
download | ruby-b958e2add835d62c0a62edaf9a23ecbbd70a3635.tar.gz |
Removed canonicalization for mathn
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -7593,13 +7593,7 @@ finish_exact_sum(long n, VALUE r, VALUE v, int z) if (n != 0) v = rb_fix_plus(LONG2FIX(n), v); if (r != Qundef) { - /* r can be an Integer when mathn is loaded */ - if (FIXNUM_P(r)) - v = rb_fix_plus(r, v); - else if (RB_TYPE_P(r, T_BIGNUM)) - v = rb_big_plus(r, v); - else - v = rb_rational_plus(r, v); + v = rb_rational_plus(r, v); } else if (!n && z) { v = rb_fix_plus(LONG2FIX(0), v); |