[DOC] ZJIT: Add ZJIT to autolink_excluded_words

This tells RDoc to not automatically link to the `ZJIT` module so we
don't need to keep escaping the word ZJIT in the documentation/comments.
This commit is contained in:
Stan Lo 2025-08-11 21:34:54 +01:00 committed by Alan Wu
parent 9fb34f4f16
commit 39effad486
2 changed files with 6 additions and 5 deletions

View file

@ -19,5 +19,6 @@ autolink_excluded_words:
- RDoc - RDoc
- Ruby - Ruby
- Set - Set
- ZJIT
canonical_root: https://docs.ruby-lang.org/en/master canonical_root: https://docs.ruby-lang.org/en/master

10
zjit.rb
View file

@ -1,10 +1,10 @@
# frozen_string_literal: true # frozen_string_literal: true
# This module allows for introspection of \ZJIT, CRuby's just-in-time compiler. # This module allows for introspection of ZJIT, CRuby's just-in-time compiler.
# Everything in the module is highly implementation specific and the API might # Everything in the module is highly implementation specific and the API might
# be less stable compared to the standard library. # be less stable compared to the standard library.
# #
# This module may not exist if \ZJIT does not support the particular platform # This module may not exist if ZJIT does not support the particular platform
# for which CRuby is built. # for which CRuby is built.
module RubyVM::ZJIT module RubyVM::ZJIT
# Avoid calling a Ruby method here to avoid interfering with compilation tests # Avoid calling a Ruby method here to avoid interfering with compilation tests
@ -14,12 +14,12 @@ module RubyVM::ZJIT
end end
class << RubyVM::ZJIT class << RubyVM::ZJIT
# Check if \ZJIT is enabled # Check if ZJIT is enabled
def enabled? def enabled?
Primitive.cexpr! 'RBOOL(rb_zjit_enabled_p)' Primitive.cexpr! 'RBOOL(rb_zjit_enabled_p)'
end end
# Return \ZJIT statistics as a Hash # Return ZJIT statistics as a Hash
def stats def stats
stats = Primitive.rb_zjit_stats stats = Primitive.rb_zjit_stats
return nil if stats.nil? return nil if stats.nil?
@ -32,7 +32,7 @@ class << RubyVM::ZJIT
stats stats
end end
# Get the summary of \ZJIT statistics as a String # Get the summary of ZJIT statistics as a String
def stats_string def stats_string
buf = +'' buf = +''
stats = self.stats stats = self.stats