hash.c: detect recursion for all

* 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
This commit is contained in:
nobu 2013-12-03 13:18:30 +00:00
parent c7159e81fc
commit 6f2efe84fb
6 changed files with 54 additions and 81 deletions

View file

@ -2053,6 +2053,7 @@ class TestArray < Test::Unit::TestCase
assert_not_equal([[1]].hash, [[2]].hash)
a = []
a << a
assert_not_equal([a, 1].hash, [a, 2].hash)
assert_not_equal([a, a].hash, a.hash) # Implementation dependent
end