diff options
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 |