mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* lib/rdoc/servlet.rb: Fixed display of site and home documentation.
Fixes rdoc issue #170 by Thomas Leitner. * test/rdoc/test_rdoc_servlet.rb: Test for above. * lib/rdoc/code_object.rb: Split #initialize_visibility from #initialize for reuse when loading a stored object. Fixes rdoc issue #171 by Thomas Leitner. * lib/rdoc/any_method.rb: Initialize visibility for #display? For rdoc issue #171 * lib/rdoc/attr.rb: ditto. * lib/rdoc/class_module.rb: ditto. * lib/rdoc/top_level.rb: ditto. * test/rdoc/test_rdoc_any_method.rb: Test for above. * test/rdoc/test_rdoc_attr.rb: ditto. * test/rdoc/test_rdoc_class_module.rb: ditto. * test/rdoc/test_rdoc_constant.rb: ditto. * test/rdoc/test_rdoc_top_level.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
95548d9dc3
commit
5864dbc9f1
13 changed files with 110 additions and 12 deletions
|
@ -387,8 +387,12 @@ version. If you're viewing Ruby's documentation, include the version of ruby.
|
|||
|
||||
def store_for source_name
|
||||
case source_name
|
||||
when 'home' then
|
||||
RDoc::Store.new RDoc::RI::Paths.home_dir, :home
|
||||
when 'ruby' then
|
||||
RDoc::Store.new RDoc::RI::Paths.system_dir, :system
|
||||
when 'site' then
|
||||
RDoc::Store.new RDoc::RI::Paths.site_dir, :site
|
||||
else
|
||||
ri_dir, type = ri_paths.find do |dir, dir_type|
|
||||
next unless dir_type == :gem
|
||||
|
@ -396,7 +400,8 @@ version. If you're viewing Ruby's documentation, include the version of ruby.
|
|||
source_name == dir[%r%/([^/]*)/ri$%, 1]
|
||||
end
|
||||
|
||||
raise "could not find ri documentation for #{source_name}" unless
|
||||
raise RDoc::Error,
|
||||
"could not find ri documentation for #{source_name}" unless
|
||||
ri_dir
|
||||
|
||||
RDoc::Store.new ri_dir, type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue