summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 038d0c2db2..3a7c28afd3 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -3,6 +3,7 @@ require 'test/unit'
require 'tmpdir'
require 'tempfile'
+require_relative '../lib/jit_support'
class TestRubyOptions < Test::Unit::TestCase
def write_file(filename, content)
@@ -171,14 +172,16 @@ class TestRubyOptions < Test::Unit::TestCase
end
assert_equal([], e)
end
- assert_in_out_err(%w(--version --jit)) do |r, e|
- assert_match(VERSION_PATTERN_WITH_JIT, r[0])
- if RubyVM::MJIT.enabled?
- assert_equal(RUBY_DESCRIPTION, r[0])
- else
- assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ if JITSupport.supported?
+ assert_in_out_err(%w(--version --jit)) do |r, e|
+ assert_match(VERSION_PATTERN_WITH_JIT, r[0])
+ if RubyVM::MJIT.enabled?
+ assert_equal(RUBY_DESCRIPTION, r[0])
+ else
+ assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ end
+ assert_equal([], e)
end
- assert_equal([], e)
end
end