diff --git a/kernel.rb b/kernel.rb index f8ca908fa0..554de49977 100644 --- a/kernel.rb +++ b/kernel.rb @@ -290,7 +290,9 @@ module Kernel Primitive.rb_f_integer(arg, base, exception) end end +end +class Module # Internal helper for built-in initializations to define methods only when YJIT is enabled. # This method is removed in yjit_hook.rb. private def with_yjit(&block) # :nodoc: diff --git a/yjit_hook.rb b/yjit_hook.rb index c4a89617f4..8f0f38aaf1 100644 --- a/yjit_hook.rb +++ b/yjit_hook.rb @@ -4,6 +4,6 @@ if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? end # Remove the helper defined in kernel.rb -module Kernel +class Module undef :with_yjit end