summaryrefslogtreecommitdiff
path: root/test/objspace/test_objspace.rb
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-08-18 19:56:42 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2020-08-18 19:57:45 -0700
commit7226f76255ff0fc209c973c6560f2331a676232b (patch)
tree308713e6b89a067b4515f46eea9153fdcf426dc5 /test/objspace/test_objspace.rb
parente939a5c29f3ca57e852d69cbecac2936035e96c7 (diff)
downloadruby-7226f76255ff0fc209c973c6560f2331a676232b.tar.gz
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
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r--test/objspace/test_objspace.rb1
1 files changed, 1 insertions, 0 deletions
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{