1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see

rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
  platforms, introduced at r32433.
  backported r32512 from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-07-11 06:19:39 +00:00
parent 93b59e38a2
commit d7080856a4
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,10 @@
Mon Jul 11 15:17:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
platforms, introduced at r32433.
backported r32512 from trunk.
Sun Jul 10 23:58:55 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* version.h: 1.9.3 is no longer trunk.

View file

@ -1981,7 +1981,7 @@ rb_num2ull(VALUE val)
rb_raise(rb_eTypeError, "no implicit conversion from nil");
case T_FIXNUM:
return (LONG_LONG)FIX2ULONG(val);
return (LONG_LONG)FIX2LONG(val); /* this is FIX2LONG, inteneded */
case T_FLOAT:
if (RFLOAT_VALUE(val) < ULLONG_MAX_PLUS_ONE