aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-23 14:38:24 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-11-10 11:14:15 +0900
commitb958e2add835d62c0a62edaf9a23ecbbd70a3635 (patch)
tree13a6f53e0fd2b6aae77d4ee7e206c2d8bc346f30 /array.c
parent8b3653b484a1130987c6b774c71e69a4a64a4f27 (diff)
downloadruby-b958e2add835d62c0a62edaf9a23ecbbd70a3635.tar.gz
Removed canonicalization for mathn
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/array.c b/array.c
index 6a7a790fec..ba13ac54e5 100644
--- a/array.c
+++ b/array.c
@@ -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);