diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-11 20:59:02 -0800 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-11 20:59:03 -0800 |
| commit | e4caf59cc112d3fca6bc1f8e912135f856061218 (patch) | |
| tree | aeebdc4d8e284cb7de0c41d40fff53a2fba9a354 /test/ruby | |
| parent | 4445b9e2a2dda207a2b3698c042342dd794b1b35 (diff) | |
Move yjit_force_enabled? to JITSupport
for consistency
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_rubyoptions.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index c45ecf5a4c..13d720be9e 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -151,7 +151,7 @@ class TestRubyOptions < Test::Unit::TestCase assert_match(VERSION_PATTERN, r[0]) 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 + elsif self.class.yjit_enabled? && !JITSupport.yjit_force_enabled? assert_equal(NO_JIT_DESCRIPTION, r[0]) else assert_equal(RUBY_DESCRIPTION, r[0]) @@ -228,7 +228,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_rjit_disabled_version return unless JITSupport.rjit_supported? - return if yjit_force_enabled? + return if JITSupport.yjit_force_enabled? env = { 'RUBY_YJIT_ENABLE' => nil } # unset in children [ @@ -246,7 +246,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_rjit_version return unless JITSupport.rjit_supported? - return if yjit_force_enabled? + return if JITSupport.yjit_force_enabled? env = { 'RUBY_YJIT_ENABLE' => nil } # unset in children [ @@ -1124,10 +1124,4 @@ class TestRubyOptions < Test::Unit::TestCase omit "#{IO::NULL} is not a character device" unless File.chardev?(IO::NULL) assert_in_out_err([IO::NULL], success: true) end - - private - - def yjit_force_enabled? - "#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?YJIT_FORCE_ENABLE\b/) - end end |
