summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index c4210279a4..2dc1dd18bf 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2196,7 +2196,7 @@ int_pow(x, y)
do {
while (y % 2 == 0) {
long x2 = x * x;
- if (x2 < x || !POSFIXABLE(x2)) {
+ if (x2/x != x || !POSFIXABLE(x2)) {
VALUE v;
bignum:
v = rb_big_pow(rb_int2big(x), LONG2NUM(y));