From 298eb75af5a3839328d31046c9e2b05f08730094 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Thu, 21 Oct 2021 19:35:43 -0400 Subject: [PATCH] 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 simple test 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 53cdcc69ac1c0c..20db784a390022 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -662,7 +662,11 @@ def foo 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 }