summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-16 14:30:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-16 14:30:24 +0000
commitfae19d62290763330d5b489dbc5d360c45be1ad7 (patch)
treeee43148d1af6e910bfea42952186ca0ea67db9be /bignum.c
parent0e2aa330ec5e16b237127db46ebde4eacc84f8c5 (diff)
* bignum.c (rb_integer_float_cmp): use FIXNUM_MIN and FIXNUM_MAX,
instead of LONG_MIN and LONG_MAX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 1e8baee8dd..30e1e8a8e9 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1455,9 +1455,9 @@ rb_integer_float_cmp(VALUE x, VALUE y)
return INT2FIX(0);
#else
long xl, yl;
- if (yi < LONG_MIN)
+ if (yi < FIXNUM_MIN)
return INT2FIX(1);
- if (LONG_MAX < yi)
+ if (FIXNUM_MAX+1 <= yi)
return INT2FIX(-1);
xl = FIX2LONG(x);
yl = (long)yi;