zeitwerk 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/zeitwerk/loader.rb +3 -3
- data/lib/zeitwerk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a554ef9e7a26b8edb48779c400a620aa694e54313626505d231fa3c72d4f66fe
|
4
|
+
data.tar.gz: 779e40bff86dbb627aef9dfd3ed897620994f7578a3673b640fad2a449c61a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9038b69db15d5800aec43f5e6d2367df5ea04f19b00f0cd9a76c36eebac1f7cc2e085442e05b4ece448ef0a717b8f10c5c75367d63dbdbfb916a3e2bf505fed
|
7
|
+
data.tar.gz: 065c3b61d2cc6fb82ae3e98ddca31c4d6842cb3d7f68187c822c7b6c97720cdbfa8de9c11b5b1ff749fc655d408cc98f72dd1107e08979a5249ba6451e2539ed
|
data/README.md
CHANGED
@@ -536,7 +536,7 @@ The method `Zeitwerk::Loader.eager_load_namespace` broadcasts `eager_load_namesp
|
|
536
536
|
Zeitwerk::Loader.eager_load_namespace(MyFramework::Routes)
|
537
537
|
```
|
538
538
|
|
539
|
-
This may be handy, for example, if a framework supports plugins and a shared namespace needs to be eager loaded for the
|
539
|
+
This may be handy, for example, if a framework supports plugins and a shared namespace needs to be eager loaded for the framework to function properly.
|
540
540
|
|
541
541
|
Please, note that loaders only eager load namespaces they manage, as documented above. Therefore, this method does not allow you to eager load namespaces not managed by Zeitwerk loaders.
|
542
542
|
|
data/lib/zeitwerk/loader.rb
CHANGED
@@ -445,15 +445,15 @@ module Zeitwerk
|
|
445
445
|
next if loader == self
|
446
446
|
next if loader.ignores?(dir)
|
447
447
|
|
448
|
-
|
448
|
+
suffixed_dir = dir + "/"
|
449
449
|
loader.root_dirs.each do |root_dir, _namespace|
|
450
450
|
next if ignores?(root_dir)
|
451
451
|
|
452
452
|
root_dir = root_dir + "/"
|
453
|
-
if
|
453
|
+
if suffixed_dir.start_with?(root_dir) || root_dir.start_with?(suffixed_dir)
|
454
454
|
require "pp" # Needed for pretty_inspect, even in Ruby 2.5.
|
455
455
|
raise Error,
|
456
|
-
"loader\n\n#{pretty_inspect}\n\nwants to manage directory #{dir
|
456
|
+
"loader\n\n#{pretty_inspect}\n\nwants to manage directory #{dir}," \
|
457
457
|
" which is already managed by\n\n#{loader.pretty_inspect}\n"
|
458
458
|
EOS
|
459
459
|
end
|
data/lib/zeitwerk/version.rb
CHANGED