summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
AgeCommit message (Collapse)Author
2011-02-15* array.c (array_join): copy the encoding of the first element asnaruse
an initial encoding. * array.c (array_join_0): ditto. * array.c (array_join_1): ditto. * array.c (inspect_ary): ditto. * array.c (array_join_1): add an argument to check the appending is first one or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30Add ML Reference and a test for r30736 [ruby-core:34997]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29* array.c (rb_ary_join): [].join.encoding must be US-ASCII.naruse
[ruby-list:47790] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-25* test/ruby/test_array.rb (test_rotate!): fix expected message.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* array.c (rb_ary_shuffle_bang): bail out from modification duringnobu
shuffle. * array.c (rb_ary_sample): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* array.c (rb_ary_shuffle_bang): check number of argument.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25* array.c (rb_ary_{shuffle_bang,sample}): use Random class object.nobu
* random.c (try_get_rnd): use default_rand for Random as same as singleton methods. * random.c (rb_random_real): check the range of result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25reverted to r29091; r29092 breaks test-allshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25* random.c (rb_random_real): check the range of result.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* array.c (rb_ary_shuffle_bang, rb_ary_sample): add optionalnobu
argument random. [ruby-dev:41923] [EXPERIMENTAL] * random.c (rb_random_{int32,real,bytes}): fallback to normal method invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* array.c (rb_ary_permutation, rb_ary_repeated_permutation, ↵mrkn
rb_ary_repeated_combination, rb_ary_product): use ary_make_shared_copy instead of ary_make_substitution. [ruby-dev:42067] [Bug #3708] * test/ruby/test_array.rb (test_product, test_repeated_permutation, test_repeated_combination): append assertions against [Bug #3708]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* array.c (ary_make_shared), test/ruby/test_array.rb (test_permutation): ↵mrkn
always return the original array when it is shared. [ruby-dev:42067] [Bug #3708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* test/ruby/test_array.rb (test_product): test for r28187.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* array.c (rb_ary_product): need to set the length in order to getnobu
the entries marked. [ruby-dev:41540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29* test/ruby: fixed nonsense assertions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* array.c (rb_ary_repeated_permutation): new method added. a patchmatz
from Makoto Kishimoto in [ruby-core:29267] [ruby-core:28724] * array.c (rb_ary_repeated_combination): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-07* array.c (rb_ary_permutation): Remove limitation for lengthy permutationsmarcandre
[ruby-core:29240] * test/ruby/test_array.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03* array.c (rb_ary_product): Don't limit based on size when a block is givenmarcandre
cf [ruby-core:29240] * test/ruby/test_array.rb (class): Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02* array.c (rb_ary_product): Test for reentrymarcandre
* test/ruby/test_array.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20* array.c (rb_ary_uniq_bang): the array is already unique if theakr
length is zero or one. (rb_ary_uniq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* enum.c (enum_join): remove Enumerable#join. [ruby-core:24786]matz
* array.c (ary_join_1): use #to_ary to detect recursive array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-03* array.c (rb_ary_select_bang): select! removes all elements formatz
which block returns false. [ruby-core:27286] * array.c (rb_ary_keep_if): #keep_if, new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-10* array.c (rb_ary_push_m, rb_ary_unshift_m, rb_ary_aset),nobu
(rb_ary_insert, rb_ary_replace, rb_ary_concat), (rb_ary_uniq_bang, rb_ary_flatten_bang): check if frozen after wrong number of arguments but before TypeError. [ruby-core:28140] * hash.c (rb_hash_replace): ditto. * string.c (rb_str_replace): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22* test/ruby/test_array.rb: add a test for Array#rotate, rotate!.mame
* test/ruby/test_dir.rb, test/ruby/test_fnmatch.rb: add some tests (for coverage of dir.c). * test/ruby/test_enum.rb: add a test for Enumerable#minmax. * test/ruby/test_enumerator.rb: add some tests for Enumerator#inspect, Enumerator::Generator and Yielder. * test/ruby/test_env.rb: add a test for ENV#index. * test/ruby/test_exception.rb: add some tests (for coverage of error.c). * test/ruby/test_hash.rb: add a test for recursive check. * test/ruby/test_integer.rb: add a test for number of argument of Integer. * test/ruby/test_method.rb: add a test for define_method. * test/ruby/test_module.rb: add a test for constant of included module. * test/ruby/test_proc.rb: add a test for parameters with cfunc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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-18* test/ruby/test_array.rb: add some tests (for coverage).mame
* test/ruby/test_bignum.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04Decrease counts of tests which spend so long time.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30* vm_eval.c (rb_search_method_emtry, rb_method_call_status): splitnobu
from rb_call0(). * vm_eval.c (rb_check_funcall): get rid of raising exceptions and hiding further exceptions. [ruby-dev:39584] * vm_eval.c (rb_funcall_no_recursive): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25572 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-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