summaryrefslogtreecommitdiff
path: root/array.c
AgeCommit message (Collapse)Author
2009-03-06* array.c (rb_ary_fill): doc for Array#fill misses indicationmatz
about negative value for the start argument. [ruby-core:22497] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24* array.c (rb_ary_index, rb_ary_rindex): Emit a warning that aknu
given block is unused when an argument is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* array.c (rb_ary_index, rb_ary_rindex): We know that argc is notknu
zero when we reach here. * array.c (rb_ary_initialize, rb_ary_index): Shrink a double space. (NFC) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18* array.c (rb_ary_resurrect), string.c (rb_str_resurrect): newnobu
functions based on [ruby-dev:37983] * insns.def (putstring, duparray): use rb_{ary,str}_resurrect(). * iseq.c (iseq_data_to_ary): needs to result TS_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* array.c (rb_ary_uniq_bang, rb_ary_uniq): unique by the result ofnobu
given block. [ruby-dev:37998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* array.c (ary_resize_capa): should not overwrite outside embeddednobu
array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11* array.c (ary_make_shared): returns shared root array itself, andnobu
frozen array can be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* array.c (rb_ary_uniq): gets rid of copying.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* array.c (ary_add_hash): split from ary_make_hash().nobu
* array.c (ary_recycle_hash): clears internally used hash. this name came from [ruby-dev:37908]. * array.c (rb_ary_diff, rb_ary_and, rb_ary_or, rb_ary_uniq_bang): recycle hashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* array.c (ary_make_hash): hide a Hash used internally.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03* NEWS: add Array#sort_by!.kazu
* array.c (rb_ary_sort_by_bang): RDoc update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02* array.c (rb_ary_sort_by_bang): RDoc update. [ruby-core:21742]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02* array.c (rb_ary_sort_by_bang): new method. requested inmatz
[ruby-core:21709] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26* array.c (rb_ary_aset): fixed arguments evaluation order.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21* array.c (ary_double_capa): a new function to expand array morematz
aggressively. [ruby-core:21460] * array.c (rb_ary_store): use ary_double_capa(). * array.c (rb_ary_unshift_m): ditto. * array.c (rb_ary_splice): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 * array.c (take_items): to_ary() raises ArgumentError if cannot tousa
convert to Array. [ruby-dev:37797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* array.c (take_items), enum.c (enum_zip): tries to convert tonobu
array first. [ruby-core:21442] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17* array.c (rb_ary_push_m): add modification check before actualmatz
operation. [ruby-dev:37440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17* array.c (rb_ary_pop_m): use enum ary_take_pos_flags.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25* array.c (rb_ary_times): taint (and untrust) status should bematz
inherited by "ary * 0". [ruby-dev:37024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08merges r20050 from ruby_1_9_1 into trunk.yugui
* array.c (rb_ary_sort_bang): refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03* array.c (rb_ary_join): do not repeat self in a recursive array.nobu
[ruby-dev:37019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03* array.c (rb_ary_take_first_or_last): renamed rb_ary_partial moreyugui
appropriately. (ary_take_pos_flags): new enum. makes the fourth argument of rb_ary_take_first_or_last more descriptive. (rb_ary_partial): renamed rb_ary_partial0 more appropriately. takes a new parameter klass for what class to instanciate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-31* array.c (ary_partial0): recovers mistakenly feature change at r19723.yugui
Array#[m,n] had returned an Array even for an instance of a subclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-31* array.c (rb_ary_decrement_share): fix to work recyclingwanabe
shared-array without the following. [ruby-dev:36991] * array.c (ary_make_substitution): don't recycle substitution array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30* array.c (rb_ary_permutation): hide temporal array.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* array.c (rb_ary_sort_bang): remove SEGV when replacing array withmame
embedded one during sort. * test/ruby/test_array.rb (test_sort!): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* array.c (rb_ary_splice): remove redundant check.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* array.c (rb_ary_sort_bang): replacing array during sort brokemame
invariant of array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* revert the previous wrong commit; sorry.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* array.c (rb_ary_sort_bang): replacing array during sort brokemame
invariant of array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* array.c (rb_ary_sample): fixed sizes and randomness.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17* array.c: don't recycle shared-array while sort!.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17* array.c: recycle shared-array when it isn't referenced.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17* array.c (ary_resize_capa): renamed RESIZE_CAPA.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 * array.c (RESIZE_CAPA): check whether len is longer than capacity.usa
* array.c (rb_ary_compact_bang): resize ary before changing capacity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 * include/ruby/ruby.h: embeds the elements of an array into itsyugui
struct RArray for # of elements <= 3. * array.c: ditto. * gc.c (gc_mark_children): following the change of struct RArray. * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. * parse.y (coverage): ditto. * proc.c (curry): ditto. * .gdbinit: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07fix a typo.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* array.c (rb_ary_sample): performance improvement for huge array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* array.c (rb_ary_sample): get rid of infinite loop. #455nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* object.c (rb_obj_untrusted): new method Object#untrusted?.shugo
(rb_obj_untrust): new method Object#untrust. (rb_obj_trust): new method Object#trust. * array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c, string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c, ruby.c, marshal.c: fixes for Object#untrusted?. * test/ruby/test_module.rb, test/ruby/test_array.rb, test/ruby/test_object.rb, test/ruby/test_string.rb, test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for Object#untrusted?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12* array.c (rb_ary_delete): Array#delete to return deleted element.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11* array.c (rb_ary_sample): rename #choice to #sample. inmatz
addition, sample takes optional argument, a la #first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05* array.c (rb_ary_sort_bang): reset to real class.nobu
* file.c (rb_find_file_ext, rb_find_file): ditto. * io.c (io_reopen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04* array.c (rb_ary_sort_bang): respect overridden <=> for String andnobu
Fixnum. [ruby-core:17708] * include/ruby/node.h (NOEX_BASIC): basic definition method flag. * include/ruby/intern.h, vm_method.c (rb_method_basic_definition_p): new function to check if the method is not redefined after the initialization. * vm_method.c (rb_obj_respond_to): use rb_method_basic_definition_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04* array.c (rb_ary_tmp_new): added.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-09* array.c (rb_ary_fill): don't raise even if length is negative.akr
[ruby-core:17483], [ruby-core:17661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e