summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
AgeCommit message (Collapse)Author
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-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* test/ruby/test_array.rb (test_join2): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24018 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-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-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-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04* test/ruby/test_array.rb: fix wrong test, and add a test formame
sort_by!. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04* test/ruby/test_array.rb: add some tests for coverage.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22770 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-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-10-31* test/ruby/test_array.rb (test_array_subclass) test for r20076.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20077 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* test/ruby/test_array.rb: add some tests.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* test/ruby/test_array (test_permutation): add a test that replacesmame
array during permutation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* test/ruby/test_array.rb (test_pack): use utf-8.nobu
* test/ruby/test_pack.rb (test_pack_U): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* test/ruby/test_array.rb (test_sample): add tests for size ofmame
returned array and randomness. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* test/ruby/test_array.rb (TestArray#test_join): should restorematz
global variable after the test. [ruby-dev:36896] * test/ruby/test_hash.rb (TestHash#test_to_s): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01* lib/xmlrpc, lib/rexml, test/ruby/test_array.rb,mame
test/ruby/test_unicode_escape.rb, test/scanf/test_scanf.rb, test/rss/rss-assertions.rb: fix indentation to remove warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* golf_prelude.rb, lib/set.rb (TC_Set#test_each),knu
test/readline/test_readline_history.rb (Readline#test_each__enumerator), test/ruby/test_array.rb (TestArray#test_collect), test/ruby/test_enumerator.rb (TestEnumerator#test_initialize): Enumerable::Enumerator is now called Enumerator. * lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use enum_for instead of hardcoding Enumerable::Enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18571 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-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-06-30* test/ruby/test_array.rb (test_aset): access with too big indexmame
raises not ArgumentError but IndexError now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29* enum.c (enum_count, count_all_i, Init_Enumerable),knu
array.c (rb_ary_count): If no argument or block is given, count the number of all elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16693 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-22* array.c (flatten): check if reentered. [ruby-dev:34798]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16525 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-20* test/ruby/test_array.rb: fix tests for 64bit CPU.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* string.c (rb_enc_strlen_cr): need to set ENC_CODERANGE_7BIT ifmatz
search_nonascii() fails. [ruby-dev:34751] * string.c (rb_str_reverse): preserve coderange info if the receiver is 7bit string. * string.c (rb_str_reverse_bang): ditto. * string.c (rb_str_reverse_bang): should have called single_byte_optimizable before rb_str_modify() that clears coderange info. * string.c (tr_trans): handle single bytes more eagerly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16492 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-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-13* test/ruby/test_io_m17n.rb: remove a duplicative method.mame
* test/ruby/test_utf16.rb: rename a conflicting method name. * test/ruby/test_array.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_hash.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* test/ruby/test_array.rb (test_sort_with_callcc): test for [ruby-core:16679].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03add a test for [ruby-dev:34581].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19fix setup method.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-18* test/ruby/test_array.rb: add tests to achieve over 95% test coveragemame
of array.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16077 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
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
2007-10-02* array.c (rb_ary_product): generalized product, now takesmatz
arbitrary number of arrays. a patch from David Flanagan <david AT davidflanagan.com>. [ruby-core:12346] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* array.c (rb_ary_permutation): implementation contributed frommatz
David Flanagan. [ruby-core:12344] * array.c (rb_ary_combination): RDoc update to clarify. a patch from David Flanagan. [ruby-core:12344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* array.c (rb_ary_combination): revisit #combination behavior.matz
suggested by David Flanagan. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-29* array.c (rb_ary_combination): new method to give all combinationmatz
of elements from an array. [ruby-list:42671] * array.c (rb_ary_product): a new method to get all combinations of elements from two arrays. can be extended to combinations of n-arrays, e.g. a.product(b,c,d). anyone volunteer? * array.c (rb_ary_permutation): empty function body to calculate permutations of array elements. need volunteer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13add test for [ruby-dev:31197].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-20* test/ruby/test_array.rb (test_misc): added some testsocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-15* array.c (rb_ary_fill): tail elements were vanished when the middleocean
part of array was filled. (ie: [0,1,2,3,4].fill(-1,2,1) => [0,1,-1]) * test/ruby/test_array.rb (test_fill): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e