mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
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:
parent
df33c063fc
commit
05561ad75c
2 changed files with 11 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue