mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
1a80b5c01f
commit
4f7d401d51
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Mar 26 19:28:03 2010 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_hash.rb (test_recursive_key): recursive keys are
|
||||
permitted now. [ruby-dev:40735]
|
||||
|
||||
Fri Mar 26 12:36:10 2010 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* lib/yaml/basenode.rb: deprecating YPath methods
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue