summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 14:03:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 14:03:23 +0000
commit1103f6043630bfe9a408fb8d935e894443f35c92 (patch)
treec17ffbf236491607da09582d60c5afa6302f7591 /test/ruby
parent5ddd828eea45d47563e2f249c35e35e40a0bd1d9 (diff)
downloadruby-1103f6043630bfe9a408fb8d935e894443f35c92.tar.gz
ruby-1103f6043630bfe9a408fb8d935e894443f35c92.tar.xz
ruby-1103f6043630bfe9a408fb8d935e894443f35c92.zip
* gc.c (count_objects): clear given hash.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_objectspace.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index 6c28d6310..c6fe9f2ef 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