1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Reset object allocation trace information

Compaction makes collisions in the weak map more likely.  For now, clear
the tracing information before the test run so we get accurate results
This commit is contained in:
Aaron Patterson 2020-08-18 19:56:42 -07:00
parent e939a5c29f
commit 7226f76255
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

View file

@ -165,6 +165,7 @@ class TestObjSpace < Test::Unit::TestCase
end end
def test_trace_object_allocations def test_trace_object_allocations
ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for c0
Class.name Class.name
o0 = Object.new o0 = Object.new
ObjectSpace.trace_object_allocations{ ObjectSpace.trace_object_allocations{