From 470da1eda075017d72ed085bcd0b9303080334f3 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Thu, 17 May 2012 09:32:23 +0900 Subject: redefine POST/NEG FIXABLE using INT_MIN/MAX --- src/object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/object.c') diff --git a/src/object.c b/src/object.c index 4e479a119..44968a8cc 100644 --- a/src/object.c +++ b/src/object.c @@ -565,8 +565,7 @@ mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base) switch (mrb_type(val)) { case MRB_TT_FLOAT: if (base != 0) goto arg_error; - if (mrb_float(val) <= (double)FIXNUM_MAX - && mrb_float(val) >= (double)FIXNUM_MIN) { + if (FIXABLE(mrb_float(val))) { break; } return mrb_flt2big(mrb, mrb_float(val)); -- cgit v1.2.3