summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-21 19:50:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-21 19:50:16 +0000
commit2f59e3130c0f9be681ade633bbabf41f40a5435f (patch)
treedc9156da886bcc359017d0307c5008f886a9836c /include/ruby
parentae0ca36f8b6ccb767439d799f7260b980a04895b (diff)
fix previsous change again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/ruby.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 00df85073d..7c76691702 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -455,9 +455,10 @@ static inline VALUE
INT2NUM(int v)
{
# if SIZEOF_VALUE <= SIZEOF_INT
- if (FIXABLE(v)) return INT2FIX(v);
+ if (!FIXABLE(v))
+ return rb_int2big(v);
# endif
- return rb_int2big(v);
+ return INT2FIX(v);
}
static inline VALUE
LONG2NUM(long v)
@@ -469,9 +470,10 @@ static inline VALUE
UINT2NUM(unsigned int v)
{
# if SIZEOF_VALUE <= SIZEOF_INT
- if (POSFIXABLE(v)) return LONG2FIX(v);
+ if (!POSFIXABLE(v))
+ return rb_uint2big(v);
# endif
- return rb_uint2big(v);
+ return LONG2FIX(v);
}
static inline VALUE
ULONG2NUM(unsigned long v)