diff --git a/kernel.rb b/kernel.rb index 442fb4a0b6..f8ca908fa0 100644 --- a/kernel.rb +++ b/kernel.rb @@ -293,7 +293,7 @@ module Kernel # Internal helper for built-in initializations to define methods only when YJIT is enabled. # This method is removed in yjit_hook.rb. - def with_yjit(&block) # :nodoc: + private def with_yjit(&block) # :nodoc: if defined?(RubyVM::YJIT) RubyVM::YJIT.send(:add_yjit_hook, block) end