From b4a117f8d3be2aff93521c388587eff8c8601199 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Mar 2013 01:40:52 +0000 Subject: 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 --- test/objspace/test_objspace.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/objspace/test_objspace.rb') 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 -- cgit v1.2.3