From 5cee3329df2963667d958cc7bb091f77ae9172aa Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 1 May 2025 16:50:46 +0900 Subject: [PATCH] Skip test affected by TracePoint-dependent allocation_class_path These assertions fail when TracePoint is enabled due to differing allocation context. Commented out for now until behavior is fixed. See [Bug #21298] --- test/objspace/test_objspace.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 39fa72e7dd..326cf22e1f 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -203,8 +203,9 @@ class TestObjSpace < Test::Unit::TestCase assert_equal(line1, ObjectSpace.allocation_sourceline(o1)) assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(o1)) assert_equal(c1, ObjectSpace.allocation_generation(o1)) - assert_equal(self.class.name, ObjectSpace.allocation_class_path(o1)) - assert_equal(__method__, ObjectSpace.allocation_method_id(o1)) + # These assertions fail under coverage measurement: https://bugs.ruby-lang.org/issues/21298 + #assert_equal(self.class.name, ObjectSpace.allocation_class_path(o1)) + #assert_equal(__method__, ObjectSpace.allocation_method_id(o1)) assert_equal(__FILE__, ObjectSpace.allocation_sourcefile(o2)) assert_equal(line2, ObjectSpace.allocation_sourceline(o2))