mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
alternative resolution to vendor load problem
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
This commit is contained in:
parent
9ad165cb9d
commit
fb1eebac94
1 changed files with 21 additions and 20 deletions
|
@ -313,8 +313,13 @@ module ActiveSupport #:nodoc:
|
|||
nesting = expanded_path[(expanded_root.size)..-1]
|
||||
nesting = nesting[1..-1] if nesting && nesting[0] == ?/
|
||||
next if nesting.blank?
|
||||
|
||||
[ nesting.camelize ]
|
||||
nesting_camel = nesting.camelize
|
||||
begin
|
||||
qualified_const_defined?(nesting_camel)
|
||||
rescue NameError
|
||||
next
|
||||
end
|
||||
[ nesting_camel ]
|
||||
end.flatten.compact.uniq
|
||||
end
|
||||
|
||||
|
@ -485,7 +490,6 @@ module ActiveSupport #:nodoc:
|
|||
# Build the watch frames. Each frame is a tuple of
|
||||
# [module_name_as_string, constants_defined_elsewhere]
|
||||
watch_frames = descs.collect do |desc|
|
||||
begin
|
||||
if desc.is_a? Module
|
||||
mod_name = desc.name
|
||||
initial_constants = desc.local_constant_names
|
||||
|
@ -501,12 +505,9 @@ module ActiveSupport #:nodoc:
|
|||
else
|
||||
raise Argument, "#{desc.inspect} does not describe a module!"
|
||||
end
|
||||
|
||||
[mod_name, initial_constants]
|
||||
rescue NameError
|
||||
# mod_name isn't a valid constant name
|
||||
nil
|
||||
end
|
||||
end.compact
|
||||
|
||||
constant_watch_stack.concat watch_frames
|
||||
|
||||
|
|
Loading…
Reference in a new issue