1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (count_objects): clear given hash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-05-31 14:03:23 +00:00
parent c6bac86887
commit fa58f951cf
3 changed files with 22 additions and 0 deletions

View file

@ -47,5 +47,11 @@ End
assert(h.values.all? {|x| x.is_a?(Integer) })
assert_raise(TypeError) { ObjectSpace.count_objects(1) }
h0 = {:T_FOO=>1000}
h = ObjectSpace.count_objects(h0)
p h0.equal?(h)
assert_same(h0, h)
assert_equal(0, h0[:T_FOO])
end
end