File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
activesupport/lib/active_support Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ def require_or_load(file_name, const_path = nil)
373
373
374
374
# Is the provided constant path defined?
375
375
def qualified_const_defined? ( path )
376
- Object . qualified_const_defined ?( path . sub ( /^::/ , '' ) , false )
376
+ Object . const_defined ?( path , false )
377
377
end
378
378
379
379
# Given +path+, a filesystem path to a ruby file, return an array of
@@ -607,7 +607,7 @@ def safe_constantize(name)
607
607
def autoloaded? ( desc )
608
608
return false if desc . is_a? ( Module ) && desc . anonymous?
609
609
name = to_constant_name desc
610
- return false unless qualified_const_defined? name
610
+ return false unless qualified_const_defined? ( name )
611
611
return autoloaded_constants . include? ( name )
612
612
end
613
613
You can’t perform that action at this time.
0 commit comments