summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rational.c b/rational.c
index 3917541c13..0e06eedfd0 100644
--- a/rational.c
+++ b/rational.c
@@ -735,9 +735,9 @@ rb_rational_plus(VALUE self, VALUE other)
{
get_dat1(self);
- return f_addsub(self,
- dat->num, dat->den,
- other, ONE, '+');
+ return f_rational_new_no_reduce2(CLASS_OF(self),
+ rb_int_plus(dat->num, rb_int_mul(other, dat->den)),
+ dat->den);
}
}
else if (RB_TYPE_P(other, T_FLOAT)) {