We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c26393 commit 14cff5eCopy full SHA for 14cff5e
1 file changed
lib/zeitwerk/loader/constant_path_validator.rb
@@ -8,7 +8,10 @@ class Zeitwerk::Loader::ConstantPathValidator # :nodoc
8
#
9
#: (String) -> String ! NameError
10
def validate!(possible_cpath)
11
+ # We do this before validating because as of this writing, TruffleRuby
12
+ # raises TypeError if the argument has leading colons.
13
+ possible_cpath = possible_cpath.delete_prefix('::')
14
CNAME_VALIDATOR.const_defined?(possible_cpath, false)
- possible_cpath.delete_prefix('::')
15
+ possible_cpath
16
end
17
0 commit comments