diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-26 10:32:36 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-26 10:32:36 +0000 |
commit | 4f7d401d51ff408e070fd2b5a389224da9cb56d5 (patch) | |
tree | e0f08ecb31f37241719739490f07e8689f1c3ddd /test/ruby | |
parent | 1a80b5c01ff7543ee3668e1606f5bd567cdfcf3f (diff) | |
download | ruby-4f7d401d51ff408e070fd2b5a389224da9cb56d5.tar.gz |
* test/ruby/test_hash.rb (test_recursive_key): recursive keys are
permitted now. [ruby-dev:40735]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_hash.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 920d933f76..782edc9a0c 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -898,8 +898,10 @@ class TestHash < Test::Unit::TestCase assert_nothing_raised { eval("a = 1; {a => a}; a") } end - def test_recursive_check + def test_recursive_key h = {} - assert_raise(ArgumentError) { h[h] = :foo } + assert_nothing_raised { h[h] = :foo } + h.rehash + assert_equal(:foo, h[h]) end end |