Show where objects were allocated on allocation count tests
This commit is contained in:
parent
04a6165ac0
commit
23837c5170
Notes:
git
2024-08-02 20:25:50 +00:00
@ -18,7 +18,14 @@ class TestStringMemory < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
return allocations
|
||||
return allocations.map do |instance|
|
||||
[
|
||||
ObjectSpace.allocation_sourcefile(instance),
|
||||
ObjectSpace.allocation_sourceline(instance),
|
||||
instance.class,
|
||||
instance,
|
||||
]
|
||||
end
|
||||
ensure
|
||||
GC.enable
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user