(0).div(0.0) should be NaN; fix #3754

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-07-26 15:48:50 +09:00
parent 46ab8fdf07
commit 7d5cf8749a
+1 -1
View File
@@ -829,7 +829,7 @@ fix_divmod(mrb_state *mrb, mrb_value x)
mrb_value a, b;
flodivmod(mrb, (mrb_float)mrb_fixnum(x), mrb_to_flo(mrb, y), &div, &mod);
a = mrb_float_value(mrb, (mrb_int)div);
a = mrb_float_value(mrb, div);
b = mrb_float_value(mrb, mod);
return mrb_assoc_new(mrb, a, b);
}