summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-01-29 16:22:08 -0500
committerKevin Newton <[email protected]>2024-01-29 17:05:23 -0500
commit2d6f7d0864d0a19b2ab38ebb2022487d34568c24 (patch)
treeaeccad2e1feb7d24900b0091c46e46bec6dd11bc
parent3fb741069d1d0f28367940bf8536466bb78ff837 (diff)
Fix test/ruby/test_rubyoptions.rb + --parser=prism
-rw-r--r--test/ruby/test_rubyoptions.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 97d78ba166..f753ba5574 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 /, '')