aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases whenmrkn2013-06-253-6/+37
| | | | | | | | 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
* * bignum.c (big2ulong): "check" argument removed.akr2013-06-252-10/+15
| | | | | | | | | | | (rb_big2ulong): Follow above change. (rb_big2long): Ditto. (rb_big_rshift): Ditto. (rb_big_aref): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big2ulong_pack): Use rb_integer_pack.akr2013-06-252-5/+10
| | | | | | | | | (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
* * bignum.c (LSHIFTX): Revert r41611.akr2013-06-252-1/+9
| | | | | | | | | | The redundant expression suppresses a warning, C4293, by Visual Studio. http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-06-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (big2ulong): Add a cast.akr2013-06-252-4/+15
| | | | | | | | | (big2ull): Add a specialized code for SIZEOF_LONG_LONG <= SIZEOF_BDIGITS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo by @daveworth [fix GH-340]hsbt2013-06-253-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead ofakr2013-06-252-1/+7
| | | | | | | | | "-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
* * bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=akr2013-06-252-1/+14
| | | | | | | | | SIZEOF_BDIGITS. This prevents shift witdth warning from "num <<= BITSPERDIG". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: fix oldgen/remembered_shady counting algorithm.ko12013-06-252-18/+50
| | | | | | | | | | | | | * gc.c (rgengc_check_shady): increment `objspace->rgengc.remembered_shady_object_count' here. * gc.c (rgengc_remember): return FALSE if obj is already remembered. * gc.c (rgengc_rememberset_mark): make it void. * gc.c (gc_mark_children): fix to double counting oldgen_object_count at minor GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (MSB): Removed.akr2013-06-254-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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: suppress warningnobu2013-06-252-3/+6
| | | | | | | | * 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
* bignum.c: redundant expressionnobu2013-06-252-1/+5
| | | | | | | * bignum.c (LSHIFTX): remove redundant never-true expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo.tarui2013-06-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-06-25svn2013-06-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (typedef struct rb_objspace): Change members for monitor objects.tarui2013-06-242-50/+82
| | | | | | | | | * 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
* * bignum.c (integer_unpack_single_bdigit): Refine code to fillingakr2013-06-242-2/+9
| | | | | | | | higher bits and use BIGLO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rinda.rb: fix for unimplemented ifindex()shirosaki2013-06-242-6/+18
| | | | | | | | * 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.rb: skip a test on Windowsshirosaki2013-06-242-0/+10
| | | | | | | | * 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_gem_installer.rb: fix a test failureshirosaki2013-06-242-0/+7
| | | | | | | | * 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
* dl/cfunc.c: fix conversion of Bignumshirosaki2013-06-242-1/+9
| | | | | | | | | | * 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
* * eval_error.c (warn_printf): use rb_vsprintf instead so ruby specificcharliesome2013-06-243-16/+23
| | | | | | | | | | 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
* * compile.c (make_name_for_block): use PRIsVALUE in format stringcharliesome2013-06-249-15/+28
| | | | | | | | | | | | | | | | instead of %s and RSTRING_PTR to protect objects from being garbage collected too soon * encoding.c (str_to_encindex): ditto * hash.c (rb_hash_fetch_m): ditto * io.c (rb_io_reopen): ditto * parse.y (reg_fragment_check_gen): ditto * parse.y (reg_compile_gen): ditto * parse.y (ripper_assert_Qundef): ditto * re.c (rb_reg_raise): ditto * ruby.c (set_option_encoding_once): ditto * vm_eval.c (rb_throw_obj): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indentkazu2013-06-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (after_gc_sweep): Have to record malloc info before reset.tarui2013-06-232-9/+27
| | | | | | | | * 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
* * array.c: Return value in Array overview example found by @PragTobzzak2013-06-232-1/+6
| | | | | | | [Fix GH-336] https://github.com/ruby/ruby/pull/336 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_zip): typo by @PragTob [Fix GH-337]zzak2013-06-232-1/+6
| | | | | | | https://github.com/ruby/ruby/pull/337 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-231-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/README.win32: grammar typo by @blankenshipz [Fix GH-334]zzak2013-06-232-1/+6
| | | | | | | https://github.com/ruby/ruby/pull/334 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-06-24svn2013-06-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (BIGUP): Use LSHIFTX and avoid cast to consider the typeakr2013-06-232-7/+17
| | | | | | | | | | | | | 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
* * include/ruby/defines.h (BDIGIT): Define it only if it is not definedakr2013-06-233-50/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * bignum.c (integer_unpack_single_bdigit): Use a cast.akr2013-06-232-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_thread.rb: rescue resource limitation errors.ko12013-06-232-4/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (integer_unpack_single_bdigit): Extracted fromakr2013-06-222-44/+26
| | | | | | | | bary_unpack_internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.akr2013-06-222-4/+9
| | | | | | | | Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, gc.c: rename macros and functions:ko12013-06-226-18/+26
| | | | | | | | | | | | OBJ_WB_GIVEUP() -> OBJ_WB_UNPROTECT(), rb_obj_wb_giveup() -> rb_obj_wb_unprotect(), rb_gc_giveup_promoted_writebarrier() -> rb_gc_writebarrier_unprotect_promoted(), * class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_include_class_new), eval.c (rb_using_refinement):ko12013-06-224-3/+34
| | | | | | | | | | | | make classes/modules (who share method table) shady. If module `a' and `b' shares method table m_tbl and new method with iseq is added, then write barrier is applied only `a' or `b'. To avoid this issue, shade such classes/modules. * vm_method.c (rb_method_entry_make): add write barriers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_zero_p): Removed.akr2013-06-222-25/+20
| | | | | | | | (bary_pack): Don't call bytes_zero_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_zero_p): Extracted from bary_pack.akr2013-06-222-7/+19
| | | | | | | | (bary_pack): Use bytes_zero_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (MSB): New macro.akr2013-06-222-6/+14
| | | | | | | | | | (bary_unpack_internal): Use MSB. (bary_divmod): Ditto. (bigdivrem): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-06-23svn2013-06-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update comments.akr2013-06-221-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Unused code removed.akr2013-06-221-114/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_swap): New function.akr2013-06-222-30/+25
| | | | | | | | | (bary_pack): Use bary_swap. (bary_unpack_internal): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_2comp): Renamed from quad_buf_complement.akr2013-06-222-129/+32
| | | | | | | | | | (bary_pack): Use bytes_2comp. (rb_quad_pack): Use rb_integer_pack. (rb_quad_unpack): Use rb_integer_unpack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_integer_unpack): Don't allocate a Bignum if possible.akr2013-06-222-4/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e