Skip to content

Commit

Permalink
Fix test/ruby/test_rubyoptions.rb + --parser=prism
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Jan 29, 2024
1 parent 3fb7410 commit 2d6f7d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/ruby/test_rubyoptions.rb
Expand Up @@ -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 /, '')
Expand Down

0 comments on commit 2d6f7d0

Please sign in to comment.