summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 3c0cfdaaa6..4e30d4e23b 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2361,6 +2361,7 @@ fix_pow(VALUE x, VALUE y)
x = rb_int2big(FIX2LONG(x));
return rb_big_pow(x, y);
case T_FLOAT:
+ if (RFLOAT(y)->value == 0.0) return rb_float_new(1.0);
if (a == 0) {
return rb_float_new(RFLOAT(y)->value < 0 ? (1.0 / zero) : 0.0);
}