diff --git a/ChangeLog b/ChangeLog index 946524c79f..f2698fc66e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 26 19:28:03 2010 Shugo Maeda + + * 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 * lib/yaml/basenode.rb: deprecating YPath methods 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