ext/objspace/objspace.c: remove unneeded code clones.

`setup_hash` have already performed nil check and empty check.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2017-09-17 23:56:37 +00:00
parent df33c063fc
commit 05561ad75c
2 changed files with 11 additions and 22 deletions

View file

@ -61,9 +61,19 @@ class TestObjSpace < Test::Unit::TestCase
res = ObjectSpace.count_objects_size
assert_not_empty(res)
assert_operator(res[:TOTAL], :>, 0)
end
def test_count_objects_size_with_hash
arg = {}
ObjectSpace.count_objects_size(arg)
assert_not_empty(arg)
arg = {:TOTAL => 1 }
ObjectSpace.count_objects_size(arg)
assert_not_empty(arg)
end
def test_count_objects_size_with_wrong_type
assert_raise(TypeError) { ObjectSpace.count_objects_size(0) }
end
def test_count_nodes