summaryrefslogtreecommitdiff
path: root/array.c
AgeCommit message (Collapse)Author
2011-01-17* array.c (rb_ary_times): less MEMCPY calls.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-11fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-11* array.c (rb_ary_resize): should care of embeded array when extendingusa
the array. * array.c (rb_ary_resize): need to set capa when changing the real size of the array. these are latent bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05* array.c (rb_ary_modify): export.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05* array.c (rb_ary_resize): new utility function. [ruby-dev:42912]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-09* array.c (rb_ary_dup): should copy contents only. no instancematz
variable, no class would be copied. it would affect methods #sort, #reject, #transpose, #uniq, #compact, and #shuffle. [ruby-core:33640] * array.c (rb_ary_reverse_m): ditto. * array.c (rb_ary_rotate_m): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01* array.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu
transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19Commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19* test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13* array.c (rb_ary_and, rb_ary_or), class.c (rb_mod_init_copy),nobu
gc.c (undefine_final), time.c (time_mload): get rid of type-punning casts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-01* array.c (rb_ary_rotate_m): fix typo of rdoc.naruse
patched by Andrei Kulakov [ruby-core:31975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27* array.c (rb_ary_sample): removed unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* array.c (rb_ary_shuffle_bang): bail out from modification duringnobu
shuffle. * array.c (rb_ary_sample): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* array.c (rb_ary_shuffle): rdoc fix. argument name was missing.nobu
a patch from Run Paint Run Run at [ruby-core:31848]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* array.c (rb_ary_shuffle_bang): check number of argument.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25* array.c (rb_ary_{shuffle_bang,sample}): use Random class object.nobu
* random.c (try_get_rnd): use default_rand for Random as same as singleton methods. * random.c (rb_random_real): check the range of result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25reverted to r29091; r29092 breaks test-allshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25* array.c (rb_ary_{shuffle_bang,sample}): use Random class object.nobu
* random.c (try_get_rnd): use default_rand for Random as same as singleton methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25* array.c (rb_ary_sample): use frozen shared array to get rid ofnobu
reallocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* array.c (rb_ary_shuffle_bang, rb_ary_sample): add optionalnobu
argument random. [ruby-dev:41923] [EXPERIMENTAL] * random.c (rb_random_{int32,real,bytes}): fallback to normal method invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* array.c (RAND_UPTO): macro for random number.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* array.c (rb_ary_permutation, rb_ary_repeated_permutation, ↵mrkn
rb_ary_repeated_combination, rb_ary_product): use ary_make_shared_copy instead of ary_make_substitution. [ruby-dev:42067] [Bug #3708] * test/ruby/test_array.rb (test_product, test_repeated_permutation, test_repeated_combination): append assertions against [Bug #3708]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18forget to commit.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* array.c (ary_make_shared), test/ruby/test_array.rb (test_permutation): ↵mrkn
always return the original array when it is shared. [ruby-dev:42067] [Bug #3708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* configure.in, include/ruby/defines.h (RUBY_FUNC_EXPORTED): macronobu
to declare exported function. * array.c (rb_ary_memsize), string.c (rb_str_memsize), variable.c (rb_objspace_data_type_memsize): used in objspace. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-19* array.c (rb_ary_clear): should not unshare embedded array, andnobu
should make unshared array embedded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* array.c (rb_ary_clear): no need to duplicate buffer just beforenobu
clearing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* array.c (rb_ary_product): clear uninitialized elements in temporaryakr
array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* array.c (rb_ary_product): need to set the length in order to getnobu
the entries marked. [ruby-dev:41540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-28 * array.c (rb_ary_product): Use tmpary instead, to ensure markingshyouhei
arrays by GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-28 * array.c (rb_ary_product): Do not rely on GC, t0 should beshyouhei
checked explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* array.c (rb_ary_fetch, rb_ary_splice, rb_ary_store): Improve IndexErrormarcandre
messages [ruby-core:28394] * hash.c (rb_hash_fetch_m): Improve KeyError message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* array.c (rb_ary_repeated_permutation): new method added. a patchmatz
from Makoto Kishimoto in [ruby-core:29267] [ruby-core:28724] * array.c (rb_ary_repeated_combination): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-07* array.c (rb_ary_permutation): Remove limitation for lengthy permutationsmarcandre
[ruby-core:29240] * test/ruby/test_array.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03* array.c (rb_ary_product): Don't limit based on size when a block is givenmarcandre
cf [ruby-core:29240] * test/ruby/test_array.rb (class): Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02* array.c (rb_ary_product): Make defensive copy in case of block...marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02* array.c (rb_ary_product): Test for reentrymarcandre
* test/ruby/test_array.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02* array.c (rb_ary_product): Accept a block [ruby-core:29045]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20* array.c (rb_ary_uniq_bang): the array is already unique if theakr
length is zero or one. (rb_ary_uniq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* enum.c (enum_join): remove Enumerable#join. [ruby-core:24786]matz
* array.c (ary_join_1): use #to_ary to detect recursive array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-03* array.c (rb_ary_select_bang): select! removes all elements formatz
which block returns false. [ruby-core:27286] * array.c (rb_ary_keep_if): #keep_if, new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-15* array.c (rb_ary_push_m): use rb_ary_modify instead ofnaruse
rb_ary_modify_check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-13* array.c (rb_ary_delete): RDoc update. a patch from Hugh Sasse.matz
[ruby-core:28128] * array.c (rb_ary_compact_bang): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-10* array.c (rb_ary_push_m, rb_ary_unshift_m, rb_ary_aset),nobu
(rb_ary_insert, rb_ary_replace, rb_ary_concat), (rb_ary_uniq_bang, rb_ary_flatten_bang): check if frozen after wrong number of arguments but before TypeError. [ruby-core:28140] * hash.c (rb_hash_replace): ditto. * string.c (rb_str_replace): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21* array.c (rb_ary_rotate): new methods, Array#rotate! andnobu
Array#rotate. [ruby-dev:17194] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21* array.c (rb_ary_reverse_m): copy directly.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e