summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-22 10:53:42 -0400
committerGitHub <noreply@github.com>2021-10-22 10:53:42 -0400
commitba4bf8a1e6554c47b5559a6568ebb8aea5a21d9e (patch)
tree6e7f1bddb4b3f20bbafa166b981b83aef6ca63ad /bootstraptest
parentd09cb64ae5c618f1cb2d90c544b7e0bc55ebb003 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5004 Merged-By: XrXr
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb6
1 files changed, 5 insertions, 1 deletions
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
}