(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
is before sweep?
* gc.c (rb_gc_force_recycle): Have to clear mark bit if object's slot
already ready to mainor sweep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
DESTDIR via command line to override what's in MAKEFLAGS. This
fixes an installation problem under a package building
environment where DESTDIR is specified in the (parent) command
line. [Fixes GH-327]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the argument x is not a BigDecimal.
This change is based on the patch made by Garth Snyder.
[Fix GH-332] https://github.com/ruby/ruby/pull/332
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(rb_big_aref): Call big2ulong with TRUE for "check" argument.
It should be non-effective.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
"-u" to suppress warning (C4146) by Visual Studio.
Reported by ko1 via IRC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(BDIGIT_MSB): Defined using BIGRAD_HALF.
(bary_2comp): Apply BIGLO after possible over flow of BDIGIT.
(get2comp): Ditto.
(bary_unpack_internal): Use BDIGIT_MSB.
Apply BIGLO after possible over flow of BDIGIT.
(rb_integer_unpack): Use BDIGIT_MSB.
(calc_hbase): Use BDIGMAX.
(big2dbl): Use BDIGMAX.
Apply BIGLO after possible over flow of BDIGIT.
(rb_big_neg): Apply BIGLO after possible over flow of BDIGIT.
(biglsh_bang): Ditto.
(bigrsh_bang): Ditto.
(bary_divmod): Use BDIGIT_MSB.
(bigdivrem): Ditto.
(bigxor_int): Apply BIGLO after possible over flow of BDIGIT.
* marshal.c (shortlen): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
* ext/openssl/ossl_bn.c (ossl_bn_initialize): Use SIZEOF_BDIGITS
instead of sizeof(BDIGIT).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can
be bigger than long now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (gc_marks_test): Check all WriteBarrier Errors and track them in obj-tree.
* gc.c (rgengc_check_shady): Ditto.
* gc.c (gc_marks): Move 2 funtion calls to gc_marks_test for test initialize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6):
ifindex() function may not be implemented on Windows. We use another
check for the case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_nolock):
skip a failing test on Windows because flock() implementation is
different from Unix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
use ruby in build directory in case ruby is not installed.
[ruby-core:53265] [Bug #8058]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl/cfunc.c (rb_dlcfunc_call): fix conversion from Bignum to
pointer. sizeof(DLSTACK_TYPE) is larger than sizeof(long) on
Windows x64 and higher bits over sizeof(long) of DLSTACK_TYPE was
zero even if a pointer value was over 32 bits which causes SEGV on
DL::TestCPtr#test_to_ptr_io. Adding a cast solves the bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
extensions like PRIsVALUE can be used in format strings
* eval_error.c (error_print): use warn_print_str (alias for
rb_write_error_str) to print a string value instead of using
RSTRING_PTR and RSTRING_LEN manually
* eval.c (setup_exception): use PRIsVALUE instead of %s and RSTRING_PTR
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (gc_prof_timer_start): Pick out part of new record creation as gc_prof_setup_new_record.
* gc.c (gc_prof_set_malloc_info): Move point of recording allocation size to front of mark.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of x is bigger than BDIGIT_DBL.
(big2ulong): Use unsigned long to store the result.
(big2ull): Use unsigned LONG_LONG to store the result.
(bigand_int): Use long for num to avoid data loss.
(bigor_int): Ditto.
(bigxor_int): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yet. This eases tests and debug.
(SIZEOF_BDIGITS): Ditto.
(BDIGIT_DBL): Ditto.
(BDIGIT_DBL_SIGNED): Ditto.
(PRI_BDIGIT_PREFIX): Ditto.
(PRI_BDIGIT_DBL_PREFIX): Ditto.
(PRIdBDIGIT): Define it only if PRI_BDIGIT_PREFIX is defined.
(PRIiBDIGIT): Ditto.
(PRIoBDIGIT): Ditto.
(PRIuBDIGIT): Ditto.
(PRIxBDIGIT): Ditto.
(PRIXBDIGIT): Ditto.
(PRIdBDIGIT_DBL): Ditto.
(PRIiBDIGIT_DBL): Ditto.
(PRIoBDIGIT_DBL): Ditto.
(PRIuBDIGIT_DBL): Ditto.
(PRIxBDIGIT_DBL): Ditto.
(PRIXBDIGIT_DBL): Ditto.
* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Define it only if it is
not defined yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e