aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * bignum.c (bigsq): Renamed from bigsqr.akr2013-07-162-5/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (USHORT): Unused macro removed.akr2013-07-162-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: slim a path of newobj_of().ko12013-07-162-91/+106
| | | | | | | | | | | | | | | | | | * gc.c (objspace): add a new field objspace::freelist, which contains available RVALUEs. * gc.c (newobj_of): simply call new function `get_freeobj()'. get_freeobj() returns objspace::freelist. If objspace::freelist is not available, refill objspace::freelist with a slot pointed by objspace::heap::free_slots. * gc.c (before_gc_sweep): clear objspace::freelist. * gc.c (slot_sweep): clear slot::freelist. * gc.c (heaps_prepare_freeslot): renamed to heaps_prepare_freeslot. * gc.c (unlink_free_heap_slot): remove unused function. * gc.c (rb_free_const_table): remove unused function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (big_shift3): Big shift width is not a problem for rightakr2013-07-162-9/+14
| | | | | | | | shift. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: fix typonobu2013-07-162-1/+6
| | | | | | | * array.c (rb_ary_count): [DOC] fix typo. Array#count uses ==, not ===. a question at asakusa.rb ML. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_string.rb: Bug #8642nobu2013-07-161-0/+11
| | | | | | | * test/ruby/test_string.rb (test_split): test for r41994. [ruby-core:56036] [Bug #8642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_mul_karatsuba): Avoid duplicate calculation whenakr2013-07-162-7/+27
| | | | | | | | | squaring. ((bary_mul_toom3_branch): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (link_free_heap_slot): removed.ko12013-07-162-15/+18
| | | | | | | | | | | * gc.c (slot_sweep): use `heaps_add_freeslot' instead of `link_free_heap_slot'. * gc.c (assign_heap_slot): use local variable `slot' instead of `heaps'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (assign_heap_slot): refactoring variable names.ko12013-07-162-51/+71
| | | | | | | | | | | * gc.c (slot_add_freeobj): added. * gc.c (heaps_add_freeslot): added. * gc.c (finalize_list, rb_gc_force_recycle, slot_sweep): use `slot_add_freeobj' instead of modifying linked list directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (lazy_sweep): refactoring.ko12013-07-162-5/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-07-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert last commit because it fails test-all.ko12013-07-162-12/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (after_gc_sweep): refactoring code.ko12013-07-162-6/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: revert r41964nobu2013-07-162-13/+16
| | | | | | | | * encoding.c (enc_set_index): since r41967, old terminator is dealt with in str_fill_term(). should not consider it here because this function is called before any encoding is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (appendline): cosmetic changeglass2013-07-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_block_arity): raise ArgumentError if no block given.glass2013-07-162-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-levelzzak2013-07-152-0/+26
| | | | | | | classes from BigDecimal utils native extensions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-07-16svn2013-07-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c: [DOC] improve rdoc formatting for parameters and linkszzak2013-07-152-249/+253
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix spaces.akr2013-07-151-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_big2str0): Deprecated.akr2013-07-153-4/+19
| | | | | | | | | | * bignum.c (rb_big2str1): Renamed from rb_big2str0. (rb_big2str0): Deprecated wrapper for rb_big2str1. (rb_big2str): Invoke rb_big2str1 instead of rb_big2str0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_each_pair): use rb_yield_values(2, key, value)glass2013-07-152-4/+19
| | | | | | | instead of rb_yield(rb_assoc_new(key, value)) if rb_block_arity() is greater than 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c: Add static assertions.akr2013-07-152-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (rb_hash_each_pair): performance improvement by usingglass2013-07-152-1/+16
| | | | | | rb_block_arity(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_block_arity): create internal API rb_block_arity().glass2013-07-153-11/+44
| | | | | | it return arity of given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/prime.rb (Prime::EratosthenesGenerator,yugui2013-07-153-57/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prime::EratosthenesSieve): New implementation by robertjlooby <robertjlooby AT gmail.com>. * test/test_prime.rb: updated with new method name commit 4b6090ea852d63b26e02796c69b41caa0fa95077 Merge: ceda881 c8f7809 Author: Yuki Sonoda (Yugui) <yugui@yugui.jp> Date: Mon Jul 15 12:50:04 2013 +0900 Merge commit 'c8f780987fbdfbae428977487e1cf793c4c36d3f' Conflicts: lib/prime.rb commit c8f780987fbdfbae428977487e1cf793c4c36d3f Author: robertjlooby <robertjlooby@gmail.com> Date: Thu Jun 27 23:04:45 2013 -0500 updated test/test_prime.rb with new method name commit 996517bdbb3108cd1687d99613b69e539eb1567b Author: robertjlooby <robertjlooby@gmail.com> Date: Thu Jun 27 22:59:39 2013 -0500 new implementation of Prime::EratosthenesGenerator and Prime::EratosthenesSieve git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_cNumeric): [DOC] Added comment for Numeric to fix doczzak2013-07-152-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (maxpow_in_bdigit_dbl): Useless #if removed.akr2013-07-152-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_coerce): [DOC] Add docs for Bignum#coercezzak2013-07-152-1/+17
| | | | | | | | Based on patch by Juanito Fatas [Fixes GH-360] https://github.com/ruby/ruby/pull/360 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c: suppress warningsnobu2013-07-151-3/+6
| | | | | | | * bignum.c (big_shift2, rb_big_lshift, rb_big_rshift): cast explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (mutex_sleep): [DOC] Awake thread will reacquire lockzzak2013-07-152-0/+8
| | | | | | | By Tim Abdulla [Fixes GH-342] https://github.com/ruby/ruby/pull/342 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (nlz16): Use __builtin_clz if possible.akr2013-07-153-0/+39
| | | | | | | | | | | | | (nlz32): Use __builtin_clz or __builtin_clzl if possible. (nlz64): Use __builtin_clzl or __builtin_clzll if possible. (nlz128): Use __builtin_clzll if possible. * configure.in: Check __builtin_clz, __builtin_clzl and __builtin_clzll. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix a typonobu2013-07-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (power_cache_get_power): Use bitsize insteadof ceil_log2.akr2013-07-153-66/+11
| | | | | | | | | | | | | (ones): Removed. (next_pow2): Removed. (floor_log2): Removed. (ceil_log2): Removed. * configure.in (__builtin_popcountl): Don't check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* localeinit.c: splitnobu2013-07-147-64/+114
| | | | | | | | | * localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding): move from encoding.c. * miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding): define miniruby specific functions only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c: suppress a warningnobu2013-07-141-1/+1
| | | | | | * signal.c (ruby_signal): suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: char lengthnobu2013-07-141-2/+1
| | | | | | | * string.c (str_null_char): calculate char length. fix commit miss at r41967. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: NO_PRESERVED_ENCODINGnobu2013-07-144-6/+3
| | | | | | * encoding.c (rb_enc_init): no longer needs NO_PRESERVED_ENCODING. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: defer autoloadnobu2013-07-142-6/+24
| | | | | | * encoding.c (enc_inspect): defer loading autoloaded encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: encoding checknobu2013-07-142-5/+19
| | | | | | | | | * encoding.c (enc_check_encoding): use is_data_encoding() to check type consistently. * encoding.c (must_encoding): return rb_encoding* instead of encoding index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: consider old terminatornobu2013-07-142-18/+23
| | | | | | | | * string.c (str_fill_term): consider old terminator length, and should not use rb_enc_ascget since it depends on the current encoding which may not be compatible with the new terminator. [Bug #8634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-07-15svn2013-07-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: encoding at inspectnobu2013-07-142-6/+8
| | | | | | | * encoding.c (enc_inspect): use PRIsVALUE to preserve the result encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: terminator in enc_set_indexnobu2013-07-142-10/+15
| | | | | | | * encoding.c (enc_set_index): deal with terminator so that rb_enc_set_index also works. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: Check __builtin_popcountl, __builtin_bswap32 andakr2013-07-144-6/+33
| | | | | | | | | | | | | | | | | __builtin_bswap64. * internal.h (swap32): Use the configure result for the condition to use __builtin_bswap32. (swap64): Use the configure result for the condition to use __builtin_bswap64. * bignum.c (ones): Use the configure result for the condition to use __builtin_popcountl. (bary_unpack_internal): Use appropriate types for swap argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_subb): Support xn < yn.akr2013-07-142-38/+42
| | | | | | | | | | (bigsub_core): Removed. (bigsub): Don't compare before subtraction. Just subtract and get the two's complement if the subtraction causes a borrow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (DIGSPERLONG): Unused macro removed.akr2013-07-132-6/+5
| | | | | | | | (DIGSPERLL): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_aref): Less scan when the number is negative.akr2013-07-132-14/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (big_shift): Avoid signed integer overflow.akr2013-07-132-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-07-14svn2013-07-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e