diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-05 01:40:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-05 01:40:52 +0000 |
commit | b4a117f8d3be2aff93521c388587eff8c8601199 (patch) | |
tree | 997a725935411e8e17584095c0b4beea223b399b /test/objspace | |
parent | 4a429c11e1319b0e13368851454f109217ab5de5 (diff) |
objspace.c: newly added nodes
* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
and fix key for unknown node. patch by tmm1 (Aman Gupta) in
[ruby-core:53130] [Bug #8014]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/objspace')
-rw-r--r-- | test/objspace/test_objspace.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 136f7e8318..2f8503fcee 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -58,7 +58,9 @@ class TestObjSpace < Test::Unit::TestCase assert_equal(false, res.empty?) arg = {} ObjectSpace.count_nodes(arg) - assert_equal(false, arg.empty?) + assert_not_empty(arg) + bug8014 = '[ruby-core:53130] [Bug #8014]' + assert_empty(arg.select {|k, v| !(Symbol === k && Integer === v)}, bug8014) end def test_count_tdata_objects |