aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * array.c (permute0): use chars for boolean array.nobu2009-08-031-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_{permutation,combination}): disallow reentrancenobu2009-08-031-8/+16
| | | | | | | with continuation since work-buffers cannot restore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_{permutation,combination,product}): must not usenobu2009-08-031-5/+5
| | | | | | | ary_discard on strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_combination, rb_ary_product): prevent from GC.nobu2009-08-021-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: suppressed shorten-64-to-32 warnings.nobu2009-07-181-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (recursive_hash): reject recursive key.akr2009-07-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (recursive_join): raise ArgumentError for joiningmatz2009-07-171-3/+2
| | | | | | | | | | | recursive array. * array.c (ary_join_1): ditto. * test/ruby/test_array.rb (TestArray#test_join2): test updated for recursive join. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sample): RDoc update. a patch from Florianmatz2009-07-161-3/+5
| | | | | | Frank. [ruby-core:24347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (ary_join_1): should recurse for element array.nobu2009-07-101-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (recursive_join): use obj to tell if recursion occurs.nobu2009-07-101-5/+6
| | | | | | | | | [ruby-core:24150] * enum.c (enum_join): reverted r23966. [ruby-core:24196] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_join): add Enumerable#join.matz2009-07-031-32/+91
| | | | | | | | | * array.c (ary_join_1): recursive join for Enumerators (and objects with #to_a). * array.c (rb_ary_join): performance tune. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_memsize): added.ko12009-06-161-0/+11
| | | | | | | | | | | | * io.c (rb_io_memsize): added. * regcomp.c (onig_memsize): added. * string.c (rb_str_memsize): added. * transcode.c (rb_transcoding_memsize, rb_econv_memsize): added. * variable.c (rb_geneic_ivar_memsize): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_exec_recursive_paired): new function for propernobu2009-05-241-6/+6
| | | | | | | | | | | handling of recursive arrays. [EXPERIMENTAL] [ruby-core:23402] * array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above. * hash.c (hash_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_slice_bang): avoid call of rb_scan_args() unlessmatz2009-05-211-3/+9
| | | | | | it's really necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_shift, rb_ary_shift_m): clears unused elements.nobu2009-05-151-0/+6
| | | | | | | [ruby-dev:38448] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rename argument name.akr2009-05-091-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_flatten_bang): clears temporary array.nobu2009-05-081-2/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_flatten_bang): returns nil if nothing changed.nobu2009-05-071-1/+1
| | | | | | | a patch from Marc-Andre Lafortune in [ruby-core:23382]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sample): negative sample number is invalid.nobu2009-05-071-0/+1
| | | | | | | [ruby-core:23374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (Init_Array): made #to_s an alias to #inspect to reducenobu2009-05-021-1/+1
| | | | | | | | the result of recursive array. a patch from ujihisa at [ruby-dev:38362] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: fixed types.nobu2009-05-021-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_push): bypass rb_ary_store().matz2009-04-201-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_flatten): flatten(0) works as Array#dup.mame2009-04-151-1/+7
| | | | | | | | | [ruby-core:23168] * test/ruby/test_array.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu2009-03-121-3/+3
| | | | | | | | | | numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def,nobu2009-03-101-9/+9
| | | | | | | missing/crypt.c, missing/vsnprintf.c, : suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_fill): doc for Array#fill misses indicationmatz2009-03-061-0/+1
| | | | | | 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
* * array.c (rb_ary_index, rb_ary_rindex): Emit a warning that aknu2009-02-241-0/+4
| | | | | | | 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
* * array.c (rb_ary_index, rb_ary_rindex): We know that argc is notknu2009-02-231-4/+4
| | | | | | | | | | | 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
* stripped trailing spaces.nobu2009-02-221-190/+190
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_resurrect), string.c (rb_str_resurrect): newnobu2009-02-181-0/+6
| | | | | | | | | | | 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
* * string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame2009-02-141-3/+3
| | | | | | | | | | | | 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
* * array.c (rb_ary_uniq_bang, rb_ary_uniq): unique by the result ofnobu2009-02-141-17/+74
| | | | | | given block. [ruby-dev:37998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (ary_resize_capa): should not overwrite outside embeddednobu2009-02-141-1/+2
| | | | | | | array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (ary_make_shared): returns shared root array itself, andnobu2009-02-111-3/+15
| | | | | | | frozen array can be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_uniq): gets rid of copying.nobu2009-02-051-6/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (ary_add_hash): split from ary_make_hash().nobu2009-02-051-14/+30
| | | | | | | | | | | * 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
* * array.c (ary_make_hash): hide a Hash used internally.nobu2009-02-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: add Array#sort_by!.kazu2009-02-031-2/+2
| | | | | | | * 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
* * array.c (rb_ary_sort_by_bang): RDoc update. [ruby-core:21742]matz2009-02-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sort_by_bang): new method. requested inmatz2009-02-021-0/+28
| | | | | | [ruby-core:21709] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_aset): fixed arguments evaluation order.nobu2009-01-261-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (ary_double_capa): a new function to expand array morematz2009-01-211-13/+19
| | | | | | | | | | | | 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
* * array.c (take_items): to_ary() raises ArgumentError if cannot tousa2009-01-211-1/+1
| | | | | | | | convert to Array. [ruby-dev:37797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (take_items), enum.c (enum_zip): tries to convert tonobu2009-01-191-1/+3
| | | | | | | array first. [ruby-core:21442] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_push_m): add modification check before actualmatz2008-12-171-0/+1
| | | | | | operation. [ruby-dev:37440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_pop_m): use enum ary_take_pos_flags.matz2008-12-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_times): taint (and untrust) status should bematz2008-11-251-1/+5
| | | | | | inherited by "ary * 0". [ruby-dev:37024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20050 from ruby_1_9_1 into trunk.yugui2008-11-081-6/+8
| | | | | | * array.c (rb_ary_sort_bang): refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_join): do not repeat self in a recursive array.nobu2008-11-031-1/+4
| | | | | | | [ruby-dev:37019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_take_first_or_last): renamed rb_ary_partial moreyugui2008-11-031-10/+16
| | | | | | | | | | | 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