From d504f64a3b7b76195e449fd886cfe7d2b37b412f Mon Sep 17 00:00:00 2001
From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Thu, 12 Jul 2007 12:40:49 +0000
Subject: 	* insns.def (opt_succ): use LONG_MAX as maximum Fixnum VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 9fc4fcc9d4..b22b76323a 100644
--- a/insns.def
+++ b/insns.def
@@ -2304,8 +2304,7 @@ opt_succ
 	    const VALUE obj = INT2FIX(1);
 	    /* fixnum + INT2FIX(1) */
 	    val = (recv + (obj & (~1)));
-	    if ((~(recv ^ obj) & (recv ^ val)) &
-		((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
+	    if ((~(recv ^ obj) & (recv ^ val)) & (LONG_MAX + 1)) {
 		val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
 				  rb_int2big(FIX2LONG(obj)));
 	    }
-- 
cgit v1.2.3

