summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 65d9d5cb11..e5a03e1a82 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2196,6 +2196,9 @@ fix_pow(x, y)
return rb_big_pow(rb_int2big(a), y);
}
return rb_float_new(pow((double)a, (double)b));
+ } else if (TYPE(y) == T_FLOAT) {
+ long a = FIX2LONG(x);
+ return rb_float_new(pow((double)a, RFLOAT(y)->value));
}
return rb_num_coerce_bin(x, y);
}