Skip to content

Commit 34466b6

Browse files
committed
Avoid crashing older ZJIT
There were some versions that had RubyVM::ZJIT.enabled? but no RubyVM::ZJIT.stats_enabled?
1 parent c519e0e commit 34466b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

harness/harness-common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def return_results(warmup_iterations, bench_iterations)
150150
:compile_time_ns,
151151
].uniq
152152
puts "YJIT stats:"
153-
elsif zjit_stats && !RubyVM::ZJIT.stats_enabled?
153+
elsif zjit_stats && defined?(RubyVM::ZJIT.stats_enabled?) && !RubyVM::ZJIT.stats_enabled?
154154
yjit_bench_results["zjit_stats"] = zjit_stats
155155
stats_keys = [
156156
*ENV.fetch("ZJIT_BENCH_STATS", "").split(",").map(&:to_sym),

0 commit comments

Comments
 (0)