summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
AgeCommit message (Collapse)Author
2012-11-11hash.c: warn for wrong elementsnobu
* hash.c (rb_hash_s_create): just warn for wrong elements now. [ruby-dev:46440] [Bug #7300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-18* hash.c (initialize_copy): duping should rehash the hash.tenderlove
* test/ruby/test_hash.rb: added a test to ensure rehash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17* test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new testusa
to show the problem of r37232. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-16* hash.c (initialize_copy): copy the underlying st_table on dup,tenderlove
rather than copying the hash key by key. [ruby-core:48009] * test/ruby/test_hash.rb: relevant tests for initialize_copy git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14hash.c: raise on invalid inputnobu
* hash.c (rb_hash_s_create): raise an exception, when input elements are not one or two elements arrays. [ruby-core:39945] [Bug #5406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.nobu
[Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09* hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paintmarcandre
[Feature #4234] * test/ruby/test_hash.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31use super in h.defaultnobu
* test/ruby/test_hash.rb (TestHash#test_shift_none): super in singleton default method doesn't cause SystemStackError now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31* hash.c (hash_default_value): extract from rb_hash_aref(), to benobu
shared with rb_hash_shift(), so that overriding Hash#default will be respected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30descriptive assertionsnobu
* test/ruby/test_hash.rb: use more descriptive assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02* hash.c (recursive_hash): hash value of emptied hash should benobu
equal to an empty hash. [ruby-core:38650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30* hash.c (rb_hash_fetch_m): use useful message for longer key, not anobu
nonsense id value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-11* hash.c (hash_i): return different values for inverse hash.nobu
[ruby-core:34334] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-26* test/ruby/test_hash.rb (test_recursive_key): recursive keys areshugo
permitted now. [ruby-dev:40735] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-03* test/ruby/test_hash.rb (TestHash#test_keep_if): fix typo.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-03* hash.c (rb_hash_select_bang): add #select! and keep_if to Hash.matz
* hash.c (env_select_bang): ..and to ENV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-14avoid method redefinition.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 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-25supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 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* test/ruby/test_bignum.rb, test/ruby/test_class.rb,mame
test/ruby/test_defined.rb, test/ruby/test_hash.rb, test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some tests (for coverage). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17remove test for recursive hash key. [ruby-core:22921]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24* test/ruby/test_hash.rb (TestHash::test_equal2): recursive hashesmatz
are handled properly now. ref: [ruby-core:23402] * test/ruby/test_m17n.rb (TestM17N#test_sprintf_p): test fixed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23563 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-02-15add a test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* hash.c (rb_hash): always return a fixnum value because a returnmame
value of rb_hash may be used as a hash value itself and bignums have no unique VALUE. * test/ruby/test_hash.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22308 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-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-06-07* hash.c (hash_i): make Hash#hash order insensitive.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16880 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-01add tests for [ruby-dev:34556] and [ruby-dev:34555].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07* test/ruby/test_hash.rb: follow the change of Hash#flatten.mame
* test/ruby/test_time.rb: add tests to achieve over 70% test coverage of time.c. * test/ruby/test_prec.rb: ditto over 90% for prec.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05* test/ruby/test_hash.rb: add tests to achieve over 90% test coveragemame
of hash.c. * test/ruby/test_env.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-15* hash.c (rb_hash_delete_key): delete the entry without calling block.nobu
* hash.c (rb_hash_shift): should consider iter_lev too. * hash.c (delete_if_i): use rb_hash_delete_key() so that the block isn't called twice. [ruby-core:11556] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* test/ruby/test_basicinstructions.rb: remove an assertion usingko1
unsupported hash literal (such as {1, 2}). * test/ruby/test_hash.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12705 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
2004-02-18 * test/*: should not depend on $KCODE.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-28* parse.y (new_yield): remove magic argument rule; "yield [1,2]"matz
should yield single array of two elements, not two values. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06* test/ruby/test_*.rb: assert_same, assert_match, and so on.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05* lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu
array as argument. * test/ruby/test_*.rb: moved invariants to left side in assert_equal, and use assert_nil, assert_raises and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05* test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04* test/ruby: tests for ruby itself.nahi
* test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases. some tests could not be translates... search '!!' mark to see it. * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test runner should set load path correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e