diff options
Diffstat (limited to 'lib/rdoc/servlet.rb')
-rw-r--r-- | lib/rdoc/servlet.rb | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb index 4fe2f139cc..1dca7596db 100644 --- a/lib/rdoc/servlet.rb +++ b/lib/rdoc/servlet.rb @@ -326,21 +326,25 @@ version. If you're viewing Ruby's documentation, include the version of ruby. search_index << name - comment = case type - when :gem - gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, - '/specifications/\1.gemspec') - - spec = Gem::Specification.load gemspec - - spec.summary - when :system then - 'Documentation for the Ruby standard library' - when :site then - 'Documentation for non-gem libraries' - when :home then - 'Documentation from your home directory' - end + case type + when :gem + gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, + '/specifications/\1.gemspec') + + spec = Gem::Specification.load gemspec + + path = spec.full_name + comment = spec.summary + when :system then + path = 'ruby' + comment = 'Documentation for the Ruby standard library' + when :site then + path = 'site' + comment = 'Documentation for non-gem libraries' + when :home then + path = 'home' + comment = 'Documentation from your home directory' + end info << [name, '', path, '', comment] end |