Skip to content

Commit d823faa

Browse files
committed
Remove add_autoload_paths_to_load_path docs from autoloading guide
1 parent 56fd69e commit d823faa

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

guides/source/autoloading_and_reloading_constants.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,6 @@ module MyApp
228228
end
229229
```
230230

231-
$LOAD_PATH{#load_path}
232-
----------
233-
234-
Autoload paths are added to `$LOAD_PATH` by default. However, Zeitwerk uses absolute file names internally, and your application should not issue `require` calls for autoloadable files, so those directories are actually not needed there. You can opt out with this flag:
235-
236-
```ruby
237-
config.add_autoload_paths_to_load_path = false
238-
```
239-
240-
That may speed up legitimate `require` calls a bit since there are fewer lookups. Also, if your application uses [Bootsnap](https://github.com/Shopify/bootsnap), that saves the library from building unnecessary indexes, leading to lower memory usage.
241-
242-
The `lib` directory is not affected by this flag, it is added to `$LOAD_PATH` always.
243-
244231
Reloading
245232
---------
246233

0 commit comments

Comments
 (0)