module Bootsnap::LoadPathCache::CoreExt::ActiveSupport::ClassMethods
def autoload_paths=(o)
def autoload_paths=(o) r = super Bootsnap::LoadPathCache.autoload_paths_cache.reinitialize(o) r end
def autoloadable_module?(path_suffix)
def autoloadable_module?(path_suffix) Bootsnap::LoadPathCache.autoload_paths_cache.has_dir?(path_suffix) end
def depend_on(file_name, message = "No such file to load -- %s.rb")
def depend_on(file_name, message = "No such file to load -- %s.rb") CoreExt::ActiveSupport.with_bootsnap_fallback(LoadError) { super } end
def load_missing_constant(from_mod, const_name)
behaviour. The gymnastics here are a bit awkward, but it prevents
These methods call search_for_file, and we want to modify its
search_for_file, try again with the default implementation.
If we can't find a constant using the patched implementation of
def load_missing_constant(from_mod, const_name) CoreExt::ActiveSupport.with_bootsnap_fallback(NameError) { super } end
def remove_constant(const)
def remove_constant(const) CoreExt::ActiveSupport.without_bootsnap_cache { super } end
def search_for_file(path)
def search_for_file(path) return super if Thread.current[:without_bootsnap_cache] begin Bootsnap::LoadPathCache.autoload_paths_cache.find(path) rescue Bootsnap::LoadPathCache::ReturnFalse nil # doesn't really apply here end end