diff options
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/any_method.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/attr.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/class_module.rb | 1 | ||||
-rw-r--r-- | lib/rdoc/code_object.rb | 7 | ||||
-rw-r--r-- | lib/rdoc/servlet.rb | 7 | ||||
-rw-r--r-- | lib/rdoc/top_level.rb | 1 |
6 files changed, 19 insertions, 1 deletions
diff --git a/lib/rdoc/any_method.rb b/lib/rdoc/any_method.rb index b32690aa7d..23110dcb2a 100644 --- a/lib/rdoc/any_method.rb +++ b/lib/rdoc/any_method.rb @@ -123,6 +123,8 @@ class RDoc::AnyMethod < RDoc::MethodAttr # * #parent_name def marshal_load array + initialize_visibility + @dont_rename_initialize = nil @is_alias_for = nil @token_stream = nil diff --git a/lib/rdoc/attr.rb b/lib/rdoc/attr.rb index 155215ff99..960e1d1107 100644 --- a/lib/rdoc/attr.rb +++ b/lib/rdoc/attr.rb @@ -121,6 +121,8 @@ class RDoc::Attr < RDoc::MethodAttr # * #parent_name def marshal_load array + initialize_visibility + @aliases = [] @parent = nil @parent_name = nil diff --git a/lib/rdoc/class_module.rb b/lib/rdoc/class_module.rb index 1dbe57bdf1..5a279b516d 100644 --- a/lib/rdoc/class_module.rb +++ b/lib/rdoc/class_module.rb @@ -323,6 +323,7 @@ class RDoc::ClassModule < RDoc::Context end def marshal_load array # :nodoc: + initialize_visibility initialize_methods_etc @current_section = nil @document_self = true diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb index e2d9d909da..83732e3d3b 100644 --- a/lib/rdoc/code_object.rb +++ b/lib/rdoc/code_object.rb @@ -116,6 +116,13 @@ class RDoc::CodeObject @full_name = nil @store = nil + initialize_visibility + end + + ## + # Initializes state for visibility of this CodeObject and its children. + + def initialize_visibility # :nodoc: @document_children = true @document_self = true @done_documenting = false diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb index 71b2911fc0..4fe2f139cc 100644 --- a/lib/rdoc/servlet.rb +++ b/lib/rdoc/servlet.rb @@ -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 diff --git a/lib/rdoc/top_level.rb b/lib/rdoc/top_level.rb index 7b291ade80..64e12d9ff9 100644 --- a/lib/rdoc/top_level.rb +++ b/lib/rdoc/top_level.rb @@ -187,6 +187,7 @@ class RDoc::TopLevel < RDoc::Context ## # Dumps this TopLevel for use by ri. See also #marshal_load + def marshal_dump [ MARSHAL_VERSION, |