summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
AgeCommit message (Collapse)Author
2014-11-29test/ruby: suppress warningsnobu
* test/ruby/test_array.rb: (need_continuation): suppress warnings to require continuation. * test/ruby/test_continuation.rb: ditto. * test/ruby/test_enum.rb: ditto. * test/ruby/test_fiber.rb: ditto. * test/ruby/test_hash.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-14array.c: non-recursive rcombinate0nobu
* array.c (rcombinate0): remove recursion, by looping with indexes stored in `p`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-14array.c: non-recursive rpermute0nobu
* array.c (rpermute0): remove recursion, by looping with indexes stored in `p`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-14array.c: non-recursive permute0nobu
* array.c (permute0): remove recursion, by looping with indexes stored in `p`. [ruby-core:63103] [Bug #9932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-13array.c: combination on a shared copynobu
* array.c (rb_ary_combination): iterate on a shared copy, and use array of indexes instead of array of chosen objects. [ruby-core:63149] [Bug #9939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-11test_array.rb: skip if timed outnobu
* test/ruby/test_array.rb (test_shared_marking): skip if timed out, this test can just take a lot of time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-11test_array.rb: expand timeoutnobu
* test/ruby/test_array.rb (test_shared_marking): expand timeout for less powerful machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-11array.c: maybe shared arraynobu
* array.c (ary_reject): may be turned into a shared array during the given block. [ruby-dev:48101] [Bug #9727] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-11test_array.rb: do minor GCnobu
* test/ruby/test_array.rb (test_shared_marking): do minor GC to reduce WB-missed messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-11test_array.rb: simplify test_shared_markingnobu
* test/ruby/test_array.rb (test_shared_marking): simplify with timeout option and no random, also reduce same messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-10* test/ruby/test_array.rb: remove useless `assert'.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-10* array.c (rb_ary_modify): remember shared array owner if a sharedko1
array owner is promoted and a shared array is not promoted. Now, shared array is WB-unprotected so that shared arrays are not promoted. All objects referred from shared array should be marked correctly. [ruby-core:61919] [ruby-trunk - Bug #9718] * test/ruby/test_array.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13* test/ruby/test_array.rb: Ensure flatten! is used for test_flattenzzak
Patch by @ksss [Fixes GH-530] https://github.com/ruby/ruby/pull/530 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06array.c: return first unique element in Array#uniqtmm1
* array.c (ary_add_hash): Fix consistency issue between Array#uniq and Array#uniq! [Bug #9340] [ruby-core:59457] * test/ruby/test_array.rb (class TestArray): regression test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23* array.c: Have to_h raise on elements that are not key-value pairs [#9239]marcandre
* enum.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10array.c, hash.c: add saltnobu
* array.c (rb_ary_hash): add salt to differentiate false and empty array. [ruby-core:58993] [Bug #9231] * hash.c (rb_any_hash, rb_hash_hash): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08* array.c (rb_ary_shuffle_bang, rb_ary_sample): checkktsj
unknown keywords. * test/ruby/test_array.rb (test_shuffle, test_sample): tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05array.c: prefer lhs elementsnobu
* array.c (rb_ary_or): lhs elements are prefered, so should not replace with rhs elements. * test/ruby/test_array.rb (test_OR_in_order): import the test failed by r43969 from rubyspec/core/array/union_spec.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_hash.rb: move testsnobu
* test/ruby/test_hash.rb: move hash value tests from test_array.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* test/ruby/test_array.rb (test_recursive_hash_value): rename.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: same hash value for similar constructsnobu
* hash.c (rb_hash_recursive): make similar (recursive) constructs return same hash value. execute recursively, and rewind to the topmost frame with an object which .eql? to the recursive object, if recursion is detected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: detect recursion for allnobu
* hash.c (rb_hash): detect recursion for all `hash' methods. each `hash' methods no longer need to use rb_exec_recursive(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* array.c (ary_add_hash): set and return values because string keysglass
will be frozen. [ruby-core:58809] [Bug #9202] * array.c (rb_ary_uniq_bang): ditto. * array.c (rb_ary_or): ditto. * array.c (rb_ary_uniq): ditto. * test/ruby/test_array.rb: tests for above. The patch is from normalperson (Eric Wong). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26should not ignore the rest of recursive constructsnobu
* array.c (rb_ary_hash): should not ignore the rest of recursive constructs. * hash.c (rb_hash_hash): ditto. * range.c (range_hash): ditto. * struct.c (rb_struct_hash): ditto. * test/-ext-/test_recursion.rb (TestRecursion): separate from test/ruby/test_thread.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* array.c: Add Array#to_h [Feature #7292]marcandre
* enum.c: Add Enumerable#to_h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-15test_array.rb: add testnobu
* test/ruby/test_array.rb (test_last2): add test for Array#last with length argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test/ruby: assert_raise_with_messagenobu
* test/ruby: use assert_raise_with_message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-13random.c: coerce before check negativenobu
* random.c (rb_random_ulong_limited): coerce before check negative. [Fixes GH-379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19Suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19Suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18* test/ruby/test_array.rb (test_count): add a test case for #counteregon
with an argument. See Bug #8654. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18* array.c (rb_ary_count): check length to avoid SEGVeregon
while iterating. Remove other pointer loop when arg is given. * test/ruby/test_array.rb (test_count): add test for bug. [ruby-core:56072] [Bug #8654] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13* test/-ext-/test_printf.rb, test/rss/test_parser.rb,shugo
test/ruby/test_array.rb, test/ruby/test_hash.rb, test/ruby/test_m17n.rb, test/ruby/test_marshal.rb, test/ruby/test_object.rb, test/ruby/test_string.rb: don't use untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12array.c: freeze in callbacknobu
* array.c (rb_ary_uniq_bang): must not be modified once frozen even in a callback method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12array.c: freeze in callbacknobu
* array.c (rb_ary_sort_bang): must not be modified once frozen even in a callback method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22* test_array.rb: Make test more precisemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22* array.c: Avoid zip bug by not using obsolete rb_check_block_call [Bug #8153]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24test_array.rb: fix test for r39466nobu
* test/ruby/test_array.rb (test_sample_random): remove adjustment for the bug fixed by r39466. [ruby-core:52779] [Bug #7935] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08* array.c (rb_ary_dup): reverted r39004. see [Bug #7768], and theusa
release manager finailly decided to revert it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-01* array.c (rb_ary_dup): make returned array the same class as the originalcharliesome
array [Bug #7768] [ruby-core:51792] * test/ruby/test_array.rb (class TestArray): add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* array.c (rb_ary_bsearch): Raise TypeError on bad return from blockmarcandre
* range.c (range_bsearch): ditto * test/ruby/test_array.rb (class): Test for above * test/ruby/test_range.rb (class): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* array.c (rb_ary_bsearch): Return enumerator if no block [#7725]marcandre
* range.c (range_bsearch): ditto * test/ruby/test_array.rb: Test for above * test/ruby/test_range.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26* array.c: Fix rdoc for Array#delete [#7437]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-14* array.c (rb_ary_bsearch): add Array#bsearch for binary search.mame
[ruby-core:36390] [Feature #4766] * test/ruby/test_array.rb: add a test for above. * range.c (range_bsearch): add Range#bsearch for binary search. [ruby-core:36390] [Feature #4766] * test/ruby/test_range.rb: add a test for above * NEWS: added the two new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09* array.c (rb_ary_splice): fix r37583 doesn't condier the case whennaruse
beg > array length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-04* array.c (recursive_equal): fix to return true when self and otherglass
are resized to same size and the current index become out of range. * test/ruby/test_array.rb: add a test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e