mruby-rational (rat_mul_b): should not normalize multiplication results

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-09-15 02:50:57 +09:00
parent 3ce96e5c4d
commit 50225acec4
+2 -2
View File
@@ -838,8 +838,8 @@ rat_mul_b(mrb_state *mrb, mrb_value x, mrb_value y)
rat_type_error(mrb, y);
}
mrb_value a = mrb_bint_mul(mrb, mrb_as_bint(mrb, rat_numerator(mrb, x)), num);
mrb_value b = mrb_bint_mul(mrb, mrb_as_bint(mrb, rat_denominator(mrb, x)), den);
mrb_value a = mrb_bint_mul_n(mrb, mrb_as_bint(mrb, rat_numerator(mrb, x)), num);
mrb_value b = mrb_bint_mul_n(mrb, mrb_as_bint(mrb, rat_denominator(mrb, x)), den);
return rational_new_b(mrb, a, b);
}
#endif