summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-10-20 22:08:42 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-10-20 22:08:43 -0700
commit3b16d07e457264d7c171f8d1fcfaddb0dad90f57 (patch)
tree025153959dc35003670053ddde8ab32deb1cd422 /test/ruby/test_rubyoptions.rb
parent76f9bc7e660c6b46b9f80712d415151f32280e2d (diff)
Fix test_version again for RUBY_YJIT_ENABLE=1
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 4c06c74974..579d0cb362 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -210,7 +210,9 @@ class TestRubyOptions < Test::Unit::TestCase
env = {'RUBY_YJIT_ENABLE' => nil} # unset in children
assert_in_out_err([env, '--version']) do |r, e|
assert_match(VERSION_PATTERN, r[0])
- if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? || defined?(YJIT.enabled?) && YJIT.enabled? # checking -D*JIT_FORCE_ENABLE
+ if ENV['RUBY_YJIT_ENABLE'] == '1'
+ assert_equal(NO_JIT_DESCRIPTION, r[0])
+ elsif defined?(RubyVM::JIT) && RubyVM::JIT.enabled? || defined?(YJIT.enabled?) && YJIT.enabled? # checking -D(M|Y)JIT_FORCE_ENABLE
assert_equal(EnvUtil.invoke_ruby(['-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
else
assert_equal(RUBY_DESCRIPTION, r[0])