module Bootsnap::LoadPathCache::CoreExt::ActiveSupport

def self.with_bootsnap_fallback(error)

def self.with_bootsnap_fallback(error)
  yield
rescue error
  without_bootsnap_cache { yield }
end

def self.without_bootsnap_cache

def self.without_bootsnap_cache
  prev = Thread.current[:without_bootsnap_cache] || false
  Thread.current[:without_bootsnap_cache] = true
  yield
ensure
  Thread.current[:without_bootsnap_cache] = prev
end