From d823faa67b581cdcc33ce5b694d61920a219029b Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 28 Jan 2024 18:05:58 +0100 Subject: [PATCH] Remove add_autoload_paths_to_load_path docs from autoloading guide --- .../source/autoloading_and_reloading_constants.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/guides/source/autoloading_and_reloading_constants.md b/guides/source/autoloading_and_reloading_constants.md index 441aa40448c..acfaf709af9 100644 --- a/guides/source/autoloading_and_reloading_constants.md +++ b/guides/source/autoloading_and_reloading_constants.md @@ -228,19 +228,6 @@ module MyApp end ``` -$LOAD_PATH{#load_path} ----------- - -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: - -```ruby -config.add_autoload_paths_to_load_path = false -``` - -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. - -The `lib` directory is not affected by this flag, it is added to `$LOAD_PATH` always. - Reloading ---------