mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
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:
parent
c7159e81fc
commit
6f2efe84fb
6 changed files with 54 additions and 81 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue