summaryrefslogtreecommitdiff
path: root/array.c
AgeCommit message (Collapse)Author
2008-05-29Fix a typo.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-28* array.c (rb_ary_nitems, Init_Array): Axe Array#nitems().knu
cf. [ruby-dev:34676]-[ruby-dev:34713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-28* array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at theknu
beginning. [rubyspec] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27* array.c (rb_ary_slice_bang): Return an empty array instead ofknu
nil when pos is valid and len is adjusted from a valid value to zero; caught by RubySpec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23* array.c (rb_ary_slice_bang): Be consistent with Array#slice()knu
and String#slice!(). Just return nil when a negative length or out of boundary index is given instead of raising an exception via internal functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* array.c (rb_ary_compact_bang): fix reallocation size.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* array.c (flatten): check if reentered. [ruby-dev:34798]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* array.c (flatten): free memo hash table before raising exception.matz
[ruby-dev:34789] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21* array.c (flatten): fix memory leak.nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21* array.c (rb_ary_compact_bang): avoid forceful realloc.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17* array.c (rb_ary_sort_bang): should not free shared pointer, and setnobu
shared. [ruby-dev:34732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-16* array.c (rb_ary_sort_bang): stop memory leak. [ruby-dev:34726]matz
* re.c (rb_reg_search): need to free allocated buffer in re_register. * regexec.c (onig_region_new): more pedantic malloc check. * regexec.c (onig_region_resize): ditto. * regexec.c (STATE_CHECK_BUFF_INIT): ditto. * regexec.c (onig_region_copy): use onig_region_resize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14* array.c (rb_ary_count): Override Enumerable#count for betterknu
performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* array.c (rb_ary_sort_bang): freeze temporary array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08array.c: typo fixed; sorry!matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* array.c (sort_reentered): reentered check may be called frommatz
Array#sort. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* array.c (sort_1, sort_2): check for reentered and if elements arenobu
accessible. [ruby-core:16679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07* array.c (sort_1, sort_2): check reentered. [ruby-core:16679]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* array.c (rb_ary_slice_bang): should adjust length before makingmatz
sub-array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* array.c (rb_ary_dup): should dupe corresponding information.matz
[ruby-dev:34581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25* array.c (flatten): returns an instance of same class.nobu
[ruby-core:16554] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15* array.c (rb_ary_take_while, rb_ary_drop_while): removed unusednobu
variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* array.c (ary_new): new integer overflow check condition.matz
suggested by TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in [ruby-dev:34156]. * array.c (rb_ary_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13* enum.c (enum_cycle): Make Enumerable#cycle do a finite loop whenknu
the number of cycles is specified. * array.c (rb_ary_cycle): Ditto for Array#cycle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11* enum.c (enum_find_index): Add support for find_index(obj);knu
[ruby-dev:34313]. * array.c (rb_ary_index): Define find_index as an alias to index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10Fix mistake in the previous commit.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10* array.c (rb_ary_pop_m, rb_ary_shift_m): Update documents forknu
#pop() and #shift(). * array.c (rb_ary_slice_bang): Update document. Assigning array[*args]= nil no longer removes elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25* array.c (ary_new): fix size check. [ruby-dev:34123]mame
* array.c (rb_ary_take, rb_ary_drop): check negative size and use NUM2LONG instead of FIX2LONG. [ruby-dev:34123] * enum.c (enum_take, enum_drop): check negative size. * test/ruby/test_array.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-17* array.c (rb_ary_take, rb_ary_take_while, rb_ary_drop,mame
rb_ary_drop_while): new method. [ruby-dev:34067] * test/ruby/test_array.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-13* array.c (rb_ary_slice_bang): should not use rb_ary_subseq()matz
which shares internal pointer. splice modifies the receiver right after subseq. [ruby-dev:34005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-11* array.c (rb_ary_combination): argument check before creatingmatz
Enumerator. * array.c (rb_ary_permutation): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09fix doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07fix rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05* numeric.c (fix_to_s): avoid rb_scan_args() when no argumentmatz
given. * bignum.c (rb_big_to_s): ditto. * enum.c (enum_first): ditto. * eval_jump.c (rb_f_catch): ditto. * io.c (rb_obj_display): ditto. * class.c (rb_obj_singleton_methods): ditto. * object.c (rb_class_initialize): ditto. * random.c (rb_f_srand): ditto. * range.c (range_step): ditto. * re.c (rb_reg_s_last_match): ditto. * string.c (rb_str_to_i): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_chomp_bang): ditto. * string.c (rb_str_sum): ditto. * string.c (str_modifiable): declare inline. * string.c (str_independent): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* array.c (combi_len, rb_ary_product): check for overflow.nobu
[ruby-Bugs-18355] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* array.c (recursive_cmp): compare minimal length parts.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* array.c (rb_ary_eql, rb_ary_cmp): get rid of stack overflow withnobu
self-recursive constructs. [ruby-Bugs-18356] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-21* array.c (rb_ary_unshift_m): expands enough for argc. [ruby-dev:33880]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25* string.c (rb_str_usascii_new{,2}: defined.naruse
(rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when empty string. * encoding.c (rb_usascii_encoding, rb_usascii_encindex): defined. (rb_enc_inspect, enc_name, rb_locale_charmap, rb_enc_name_list_i): use rb_str_ascii_new. * array.c (recursive_join, inspect_ary): ditto. * object.c (nil_to_s, nil_inspect, true_to_s, false_to_s, rb_mod_to_s): ditto. * hash.c (inspect_hash, rb_hash_inspect, rb_f_getenv, env_fetch, env_clear, env_to_s, env_inspect): ditto. * numeric.c (flo_to_s, int_chr, rb_fix2str): ditto. * bignum.c (rb_big2str): ditto. * file.c (rb_file_ftype, rb_file_s_dirname, rb_file_s_extname, file_inspect_join, Init_file): ditto. * test/ruby/test_ruby_m17n.rb: add checks for encoding of string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24* array.c (sort_1): remove ary_sort_check(). in-place sort keepmatz
original elements even when it's modified. * array.c (sort_2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24* array.c (collect_bang_i): use rb_ary_store() to avoid potentialmatz
memory corruption. a patch from Yusuke Endoh <mame@tsg.ne.jp> in [ruby-dev:33328]. * array.c (ITERATE): remove unnecessary macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16* include/ruby/intern.h (rb_str_tmp_new, rb_str_shared_replace):nobu
prototype moved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08* enum.c (enum_zip): honor length of the receiver, not thematz
shortest length. [ruby-core:14738] * enum.c (enum_zip): returns array not enumerator for no block form. [ruby-core:14738] * enumerator.c (next_ii): do not ignore multiple values yielded. * array.c (rb_ary_zip): faster version without creating generators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-26* array.c (tmpbuf): use rb_str_tmp_new().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* include/ruby/intern.h, random.c, array.c:akr
change exported name. genrand_int32 -> rb_genrand_int32. genrand_real -> rb_genrand_real. [ruby-core:14335] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* array.c (rb_ary_at): updated documentation. a patch from Tadashimatz
Saito <shiba AT mail2.accsnet.ne.jp> in [ruby-core:14330]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* array.c (rb_ary_permutation): add volatile to avoid GC problem.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10* array.c (rb_ary_slice_bang): If an invalid range is given, doknu
not raise an exception but return nil just like slice() does. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e