File tree Expand file tree Collapse file tree
lib/bootsnap/load_path_cache/core_ext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ def require(path)
3838 rescue Bootsnap ::LoadPathCache ::ReturnFalse
3939 false
4040 rescue Bootsnap ::LoadPathCache ::FallbackScan
41- require_with_bootsnap_lfi ( path )
41+ fallback = true
42+ ensure
43+ if fallback
44+ require_with_bootsnap_lfi ( path )
45+ end
4246 end
4347
4448 alias_method ( :require_relative_without_bootsnap , :require_relative )
@@ -67,7 +71,11 @@ def load(path, wrap = false)
6771 rescue Bootsnap ::LoadPathCache ::ReturnFalse
6872 false
6973 rescue Bootsnap ::LoadPathCache ::FallbackScan
70- load_without_bootsnap ( path , wrap )
74+ fallback = true
75+ ensure
76+ if fallback
77+ load_without_bootsnap ( path , wrap )
78+ end
7179 end
7280end
7381
@@ -88,6 +96,10 @@ def autoload(const, path)
8896 rescue Bootsnap ::LoadPathCache ::ReturnFalse
8997 false
9098 rescue Bootsnap ::LoadPathCache ::FallbackScan
91- autoload_without_bootsnap ( const , path )
99+ fallback = true
100+ ensure
101+ if fallback
102+ autoload_without_bootsnap ( const , path )
103+ end
92104 end
93105end
You can’t perform that action at this time.
0 commit comments