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

* bignum.c (bigand_int): Consider negative values.

(bigor_int): The allocated bignum should have enough size
  to store long.
  This fixes (bignum fits in a BDIGIT) | (fixnum bigger than BDIGIT)
  on platforms which SIZEOF_BDIGITS < SIZEOF_LONG,
  such as LP64 with 32bit BDIGIT (no int128).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-06-26 03:16:12 +00:00
parent 3a81008354
commit 9be51267b5
4 changed files with 70 additions and 12 deletions

View file

@ -106,6 +106,8 @@ class TestIntegerComb < Test::Unit::TestCase
]
#VS.map! {|v| 0x4000000000000000.coerce(v)[0] }
#VS.concat VS.find_all {|v| Fixnum === v }.map {|v| 0x4000000000000000.coerce(v)[0] }
#VS.sort! {|a, b| a.abs <=> b.abs }
min = -1
min *= 2 while min.class == Fixnum