summaryrefslogtreecommitdiff
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
commit8e94bb29ae5c33d988cba29f130ba0d0a7276b00 (patch)
tree17f3eb310a24fabe871f4f407bd2b98f6ccb270c /lib/rdoc/ri/ri_reader.rb
parente80e14c7882d3955eb88d078f43822af030a1bf4 (diff)
ri now merges the documentation if it finds the same class in multiple places
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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 6e53bd2609..fb2c373e38 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