summaryrefslogtreecommitdiff
path: root/array.c
AgeCommit message (Collapse)Author
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
2009-10-29* array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz
to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28* string.c: rdoc for <=>, casecmpmarcandre
* bignum.c: rdoc for <=> * file.c: ditto * time.c: ditto * compar.c: rdoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-26* array.c (rb_ary_cmp): Array#<=> returns nil when comparison failsmarcandre
[ruby-core:26316] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-05* array.c (rb_ary_{times, shuffle_bang, sample}): reducing macromatz
calls inside of the loop by keeping pointers in local variables. a patch from Masahiro Kanai (CanI) in [ruby-dev:39406]. It was found and fixed at Security and Programming camp 2009. * string.c (rb_str_{times, split_m}): ditto. * struct.c (rb_struct_{getmember, set, aref_id, aset_id}, {make, inspect}_struct, recursive_{equal, hash, eql}): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02* array.c (ary_make_shared): should count frozen array itself.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-15* thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to ↵marcandre
short-circuit to the outermost level in case of recursion * test/ruby/test_thread.rb (test_recursive_outer): Test for above * hash.c (rb_hash_hash): Return a sensible hash for in case of recursion [ruby-core:24648] * range.c (rb_range_hash): ditto * struct.c (rb_struct_hash): ditto * array.c (rb_array_hash): ditto * test/ruby/test_array.rb (test_hash2): test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03* array.c (permute0): use chars for boolean array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03* array.c (rb_ary_{permutation,combination}): disallow reentrancenobu
with continuation since work-buffers cannot restore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03* array.c (rb_ary_{permutation,combination,product}): must not usenobu
ary_discard on strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-02* array.c (rb_ary_combination, rb_ary_product): prevent from GC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* array.c: suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17* array.c (recursive_hash): reject recursive key.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17* array.c (recursive_join): raise ArgumentError for joiningmatz
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
2009-07-16* array.c (rb_ary_sample): RDoc update. a patch from Florianmatz
Frank. [ruby-core:24347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10* array.c (ary_join_1): should recurse for element array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10* array.c (recursive_join): use obj to tell if recursion occurs.nobu
[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
2009-07-03* enum.c (enum_join): add Enumerable#join.matz
* 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
2009-06-16* array.c (rb_ary_memsize): added.ko1
* 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
2009-05-24* thread.c (rb_exec_recursive_paired): new function for propernobu
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
2009-05-21* array.c (rb_ary_slice_bang): avoid call of rb_scan_args() unlessmatz
it's really necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-15* array.c (rb_ary_shift, rb_ary_shift_m): clears unused elements.nobu
[ruby-dev:38448] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-09rename argument name.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-08* array.c (rb_ary_flatten_bang): clears temporary array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07* array.c (rb_ary_flatten_bang): returns nil if nothing changed.nobu
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
2009-05-07* array.c (rb_ary_sample): negative sample number is invalid.nobu
[ruby-core:23374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-02* array.c (Init_Array): made #to_s an alias to #inspect to reducenobu
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
2009-05-02* array.c: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-20* array.c (rb_ary_push): bypass rb_ary_store().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-15* array.c (rb_ary_flatten): flatten(0) works as Array#dup.mame
[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
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
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
2009-03-10* array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def,nobu
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
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