summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-10 04:52:35 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-10 04:52:35 +0000
commitd83a42aac2319b70a4e9a163dd619aca085ec1c4 (patch)
treed379f9d206970c8805303f26853bd3540062e1a8 /ruby.h
parent7696697469d974ee602b4d61dbb9a0b6c936a736 (diff)
merge revision(s) 17842:
* include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead of FIXNUM_MAX to make it possible to convert to double accurately. It assumes FLT_RADIX is 2. fix RubyForge bug #14102. backported from 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby.h b/ruby.h
index 40c95f2050..2701f0dc77 100644
--- a/ruby.h
+++ b/ruby.h
@@ -166,7 +166,7 @@ VALUE rb_ull2inum _((unsigned LONG_LONG));
#define FIX2LONG(x) RSHIFT((long)x,1)
#define FIX2ULONG(x) (((unsigned long)(x))>>1)
#define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG)
-#define POSFIXABLE(f) ((f) <= FIXNUM_MAX)
+#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
#define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))