From 7226f76255ff0fc209c973c6560f2331a676232b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 18 Aug 2020 19:56:42 -0700 Subject: [PATCH] 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 --- test/objspace/test_objspace.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 42fbc3e03c..e47917030a 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -165,6 +165,7 @@ class TestObjSpace < Test::Unit::TestCase end def test_trace_object_allocations + ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for c0 Class.name o0 = Object.new ObjectSpace.trace_object_allocations{