From 74e531ecabe07bfe987e32ff52d2239810d74617 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Thu, 17 May 2012 10:34:28 +0900 Subject: avoid isfinite() in num_pow --- src/numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/numeric.c b/src/numeric.c index c005e519e..cddd7af27 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -108,7 +108,7 @@ num_pow(mrb_state *mrb, mrb_value x) mrb_get_args(mrb, "o", &y); if (FIXNUM_P(x) && FIXNUM_P(y)) both_int = TRUE; d = pow(mrb_to_flo(mrb, x), mrb_to_flo(mrb, y)); - if (both_int && isfinite(d) && FIXABLE(d)) + if (both_int && FIXABLE(d)) return mrb_fixnum_value((mrb_int)d); return mrb_float_value(d); } -- cgit v1.2.3