summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-03-12 11:01:30 -0700
committerTakashi Kokubun <[email protected]>2024-03-12 11:02:35 -0700
commita9eb0400c2cbec8283427d1974df5b37202de67f (patch)
treea9e3cb8abb27d3a6b5bead81410c40683b1612c3 /test/ruby/test_rubyoptions.rb
parent5d71880df63aad0bcb08844816698b7ce884b87b (diff)
Check what actually needs to be checked
RubyVM::YJIT is conditionally defined, depending on --enable-yjit. However, RubyVM::YJIT.enabled? is always defined as long as RubyVM::YJIT is defined, so it seems weird to check RubyVM::YJIT.enabled? instead of RubyVM::YJIT.
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 79cdf3b4c9..8b8d12d5ae 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -8,7 +8,7 @@ require_relative '../lib/jit_support'
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?
+ def self.yjit_enabled? = defined?(RubyVM::YJIT) && 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