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.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index aca6608126..63746c3684 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -7,11 +7,11 @@ require 'tempfile'
require_relative '../lib/jit_support'
class TestRubyOptions < Test::Unit::TestCase
- def self.mjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
+ def self.rjit_enabled? = defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
def self.yjit_enabled? = defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled?
NO_JIT_DESCRIPTION =
- if mjit_enabled?
+ if rjit_enabled?
RUBY_DESCRIPTION.sub(/\+RJIT /, '')
elsif yjit_enabled?
RUBY_DESCRIPTION.sub(/\+YJIT( (dev|dev_nodebug|stats))? /, '')
@@ -149,7 +149,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_verbose
assert_in_out_err([{'RUBY_YJIT_ENABLE' => nil}, "-vve", ""]) do |r, e|
assert_match(VERSION_PATTERN, r[0])
- if self.class.mjit_enabled? && !JITSupport.mjit_force_enabled?
+ if self.class.rjit_enabled? && !JITSupport.rjit_force_enabled?
assert_equal(NO_JIT_DESCRIPTION, r[0])
elsif self.class.yjit_enabled? && !yjit_force_enabled? # checking -DYJIT_FORCE_ENABLE
assert_equal(NO_JIT_DESCRIPTION, r[0])
@@ -217,7 +217,7 @@ class TestRubyOptions < Test::Unit::TestCase
assert_match(VERSION_PATTERN, r[0])
if ENV['RUBY_YJIT_ENABLE'] == '1'
assert_equal(NO_JIT_DESCRIPTION, r[0])
- elsif self.class.mjit_enabled? || self.class.yjit_enabled? # checking -D(M|Y)JIT_FORCE_ENABLE
+ elsif self.class.rjit_enabled? || self.class.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])
@@ -230,9 +230,9 @@ class TestRubyOptions < Test::Unit::TestCase
return if yjit_force_enabled?
[
- %w(--version --mjit --disable=mjit),
- %w(--version --enable=mjit --disable=mjit),
- %w(--version --enable-mjit --disable-mjit),
+ %w(--version --rjit --disable=rjit),
+ %w(--version --enable=rjit --disable=rjit),
+ %w(--version --enable-rjit --disable-rjit),
*([
%w(--version --jit --disable=jit),
%w(--version --enable=jit --disable=jit),
@@ -248,9 +248,9 @@ class TestRubyOptions < Test::Unit::TestCase
if JITSupport.supported?
[
- %w(--version --mjit),
- %w(--version --enable=mjit),
- %w(--version --enable-mjit),
+ %w(--version --rjit),
+ %w(--version --enable=rjit),
+ %w(--version --enable-rjit),
*([
%w(--version --jit),
%w(--version --enable=jit),
@@ -259,10 +259,10 @@ class TestRubyOptions < Test::Unit::TestCase
].each do |args|
assert_in_out_err([env] + args) do |r, e|
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
- if JITSupport.mjit_force_enabled?
+ if JITSupport.rjit_force_enabled?
assert_equal(RUBY_DESCRIPTION, r[0])
else
- assert_equal(EnvUtil.invoke_ruby([env, '--mjit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ assert_equal(EnvUtil.invoke_ruby([env, '--rjit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
end
assert_equal([], e)
end
@@ -742,7 +742,7 @@ class TestRubyOptions < Test::Unit::TestCase
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n
)x,
%r(
- #{ Regexp.quote((TestRubyOptions.mjit_enabled? && !JITSupport.mjit_force_enabled?) ? NO_JIT_DESCRIPTION : RUBY_DESCRIPTION) }\n\n
+ #{ Regexp.quote((TestRubyOptions.rjit_enabled? && !JITSupport.rjit_force_enabled?) ? NO_JIT_DESCRIPTION : RUBY_DESCRIPTION) }\n\n
)x,
%r(
(?:--\s(?:.+\n)*\n)?