diff --git a/lib/yard/registry_resolver.rb b/lib/yard/registry_resolver.rb index 129d893ff..bcf2bdff0 100644 --- a/lib/yard/registry_resolver.rb +++ b/lib/yard/registry_resolver.rb @@ -132,7 +132,8 @@ def lookup_path_inherited(namespace, path, type) path.scan(split_on_separators_match).each do |part, sep| cur_obj = nil - pos += "#{part}#{sep}".length + pos += part.length + pos += sep.length parsed_end = pos == path.length if !last_obj || (!parsed_end && !last_obj.is_a?(CodeObjects::NamespaceObject))