diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-28 05:25:03 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-28 05:25:03 +0000 |
commit | 6daf55634550c612dc625f5093fc02b9b91f9f8b (patch) | |
tree | b6ac4297dc256d40603266b5536731c95dba8ef5 /include | |
parent | 6837681a4cb9405da1560dbfc3c1bcc97a7d1177 (diff) | |
download | ruby-6daf55634550c612dc625f5093fc02b9b91f9f8b.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index e6ea830e64..da4c48f447 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -193,7 +193,7 @@ VALUE rb_ull2inum(unsigned LONG_LONG); #define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1) #define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX) #define FIXNUM_P(f) (((SIGNED_VALUE)(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)) |