From 2d6f7d0864d0a19b2ab38ebb2022487d34568c24 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 29 Jan 2024 16:22:08 -0500 Subject: [PATCH] Fix test/ruby/test_rubyoptions.rb + --parser=prism --- test/ruby/test_rubyoptions.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 97d78ba1667bbe..f753ba5574e53c 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -10,6 +10,11 @@ class TestRubyOptions < Test::Unit::TestCase def self.rjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? def self.yjit_enabled? = defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled? + # Here we're defining our own RUBY_DESCRIPTION without "+PRISM". We do this + # here so that the various tests that reference RUBY_DESCRIPTION don't have to + # worry about it. The flag itself is tested in its own test. + RUBY_DESCRIPTION = ::RUBY_DESCRIPTION.sub(/\+PRISM /, '') + NO_JIT_DESCRIPTION = if rjit_enabled? RUBY_DESCRIPTION.sub(/\+RJIT /, '')