diff options
Diffstat (limited to 'lib/rdoc/code_objects.rb')
-rw-r--r-- | lib/rdoc/code_objects.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb index f5b4e81853..a8c3752cb8 100644 --- a/lib/rdoc/code_objects.rb +++ b/lib/rdoc/code_objects.rb @@ -263,6 +263,11 @@ module RDoc return self if self.name == name res = @modules[name] || @classes[name] return res if res + find_enclosing_module_named(name) + end + + # find a module at a higher scope + def find_enclosing_module_named(name) parent && parent.find_module_named(name) end @@ -316,6 +321,7 @@ module RDoc if result modules.each do |module_name| result = result.find_module_named(module_name) + break unless result end end end |