summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 6b3c377001..a222bf3401 100644
--- a/numeric.c
+++ b/numeric.c
@@ -731,7 +731,9 @@ flo_divmod(x, y)
return rb_num_coerce_bin(x, y);
}
flodivmod(RFLOAT(x)->value, fy, &div, &mod);
- return rb_assoc_new(rb_float_new(div), rb_float_new(mod));
+ x = rb_float_new(div);
+ y = rb_float_new(mod);
+ return rb_assoc_new(x, y);
}
/*