diff --git a/numeric.c b/numeric.c index aaf98b62e8..b7b60982a7 100644 --- a/numeric.c +++ b/numeric.c @@ -121,7 +121,9 @@ num_coerce(x, y) { if (CLASS_OF(x) == CLASS_OF(y)) return rb_assoc_new(y, x); - return rb_assoc_new(rb_Float(y), rb_Float(x)); + x = rb_Float(x); + y = rb_Float(y); + return rb_assoc_new(y, x); } static VALUE