From ba4bf8a1e6554c47b5559a6568ebb8aea5a21d9e Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Fri, 22 Oct 2021 10:53:42 -0400 Subject: Fix simple test on platforms where compaction is not supported 844588f9157b364244a7d34ee0fcc70ccc2a7dd9 made it so that trying to call gc_verify_compaction_references on unsupported platform result in an exception rather than a crash. Rescue the exception in a YJIT btest that uses gc_verify_compaction_references. --- bootstraptest/test_yjit.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 53cdcc69ac..20db784a39 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -662,7 +662,11 @@ assert_equal "good", %q{ foo foo - GC.verify_compaction_references(double_heap: true, toward: :empty) + begin + GC.verify_compaction_references(double_heap: true, toward: :empty) + rescue NotImplementedError + # in case compaction isn't supported + end foo } -- cgit v1.2.3