diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-31 14:03:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-31 14:03:23 +0000 |
commit | fa58f951cf6cfc60ab49bdecf93f6dc70228b7ed (patch) | |
tree | c17ffbf236491607da09582d60c5afa6302f7591 /test/ruby/test_objectspace.rb | |
parent | c6bac86887b810aff612673fc6027504ac8e4d44 (diff) | |
download | ruby-fa58f951cf6cfc60ab49bdecf93f6dc70228b7ed.tar.gz |
* gc.c (count_objects): clear given hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_objectspace.rb')
-rw-r--r-- | test/ruby/test_objectspace.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb index 6c28d63108..c6fe9f2ef2 100644 --- a/test/ruby/test_objectspace.rb +++ b/test/ruby/test_objectspace.rb @@ -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 |