Only check RubyVM on CRuby

Blind use of the RubyVM constant here prevents this test from
running on non-CRuby. This patch guards it with RUBY_ENGINE ==
"ruby" to make sure that doesn't happen.
This commit is contained in:
Charles Oliver Nutter committed 2024-10-30 15:30:28 -05:00
1 parent 5da1cc6c9c
commit 22abcce704
1 file changed
+1 -1
Notes: git 2024-10-30 20:30:47 +00:00
+1 -1
View File
@@ -11,7 +11,7 @@ class TestCoverage < Test::Unit::TestCase
# through.
ARGV = ["-rcoverage"]
if RubyVM::InstructionSequence.compile('').to_a[4][:parser] == :prism
if RUBY_ENGINE == "ruby" && RubyVM::InstructionSequence.compile('').to_a[4][:parser] == :prism
ARGV << "-W:no-experimental"
ARGV << "--parser=prism"
end