summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 08:24:20 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 08:24:20 +0000
commitbd5efa7ff6e790a07c8eaa6221e9f063d5e3e3b0 (patch)
tree8ec32d8d40f0094a2e2518afecdea44342fe5deb /lib
parent627a08251c2b2dab312307c0e9c51774c34ef016 (diff)
* lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths
instead of HTTP paths were returned. * test/rdoc/test_rdoc_servlet.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/servlet.rb34
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