summaryrefslogtreecommitdiffstats
path: root/lib/rdoc/ri/ri_reader.rb
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-30 14:22:26 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-30 14:22:26 +0000
commit6b65e32e8ca27a6a59f9cac823ad2ed60ff6bf0f (patch)
treeac67cd6d58dbc0b675cc6e74ab3df2002c0fd503 /lib/rdoc/ri/ri_reader.rb
parent321601ec07ae6f59a7257155a424bfc3e0c1feee (diff)
downloadruby-6b65e32e8ca27a6a59f9cac823ad2ed60ff6bf0f.tar.gz
ruby-6b65e32e8ca27a6a59f9cac823ad2ed60ff6bf0f.tar.xz
ruby-6b65e32e8ca27a6a59f9cac823ad2ed60ff6bf0f.zip
ri now merges the documentation if it finds the same class in multiple places
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri/ri_reader.rb')
-rw-r--r--lib/rdoc/ri/ri_reader.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/rdoc/ri/ri_reader.rb b/lib/rdoc/ri/ri_reader.rb
index 6e53bd260..fb2c373e3 100644
--- a/lib/rdoc/ri/ri_reader.rb
+++ b/lib/rdoc/ri/ri_reader.rb
@@ -48,8 +48,17 @@ module RI
# Return a class description
def get_class(class_entry)
- path = RiWriter.class_desc_path(class_entry.path_name, class_entry)
- File.open(path) {|f| RI::Description.deserialize(f) }
+ result = nil
+ for path in class_entry.path_names
+ path = RiWriter.class_desc_path(path, class_entry)
+ desc = File.open(path) {|f| RI::Description.deserialize(f) }
+ if result
+ result.merge_in(desc)
+ else
+ result = desc
+ end
+ end
+ result
end
# return the names of all classes and modules