summaryrefslogtreecommitdiff
path: root/test/lib/jit_support.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/jit_support.rb')
-rw-r--r--test/lib/jit_support.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 1b15f685a0..79fdbcce48 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -16,4 +16,10 @@ module JITSupport
def yjit_force_enabled?
"#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?YJIT_FORCE_ENABLE\b/)
end
+
+ def zjit_supported?
+ return @zjit_supported if defined?(@zjit_supported)
+ # nil in mswin
+ @zjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['ZJIT_SUPPORT'])
+ end
end