summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
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);