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.
This commit is contained in:
Alan Wu 2021-10-22 10:53:42 -04:00 committed by GitHub
parent d09cb64ae5
commit ba4bf8a1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2021-10-22 23:54:05 +09:00
Merged: https://github.com/ruby/ruby/pull/5004

Merged-By: XrXr

View File

@ -662,7 +662,11 @@ assert_equal "good", %q{
foo
foo
begin
GC.verify_compaction_references(double_heap: true, toward: :empty)
rescue NotImplementedError
# in case compaction isn't supported
end
foo
}