summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb4
-rw-r--r--test/ruby/test_yjit.rb3
2 files changed, 4 insertions, 3 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 0f73eb1682..665d93fc16 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -233,7 +233,7 @@ class TestRubyOptions < Test::Unit::TestCase
%w(--version --jit --disable=jit),
%w(--version --enable=jit --disable=jit),
%w(--version --enable-jit --disable-jit),
- ] unless /^x86_64|mswin64/ =~ RUBY_PLATFORM),
+ ] unless JITSupport.yjit_supported?),
].each do |args|
assert_in_out_err([env] + args) do |r, e|
assert_match(VERSION_PATTERN, r[0])
@@ -251,7 +251,7 @@ class TestRubyOptions < Test::Unit::TestCase
%w(--version --jit),
%w(--version --enable=jit),
%w(--version --enable-jit),
- ] unless /^x86_64|mswin64/ =~ RUBY_PLATFORM),
+ ] unless JITSupport.yjit_supported?),
].each do |args|
assert_in_out_err([env] + args) do |r, e|
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index 6390ab4c01..41a6d50779 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -2,6 +2,7 @@
require 'test/unit'
require 'envutil'
require 'tmpdir'
+require_relative '../lib/jit_support'
return unless defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
@@ -29,7 +30,7 @@ class TestYJIT < Test::Unit::TestCase
%w(--version --disable=jit --yjit),
%w(--version --disable=jit --enable-jit),
%w(--version --disable=jit --enable=jit),
- ] if RUBY_PLATFORM.start_with?('x86_64-') && RUBY_PLATFORM !~ /mswin|mingw|msys/),
+ ] if JITSupport.yjit_supported?),
].each do |version_args|
assert_in_out_err(version_args) do |stdout, stderr|
assert_equal(RUBY_DESCRIPTION, stdout.first)