summaryrefslogtreecommitdiff
path: root/lib/rdoc/class_module.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 21:17:31 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 21:17:31 +0000
commite75e7fcc9f90d41ae14019c0f3b5d5048badbb5a ()
tree3611123592f58ecbf7c0ff8d54b22b5fcdeb60f1 /lib/rdoc/class_module.rb
parent6f1ce28d624007f1d7688865a782c3ba4ad376a0 (diff)
* lib/rdoc: Update to RDoc 3.8 which contains fixes for documentation
in trunk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rdoc/class_module.rb43
1 files changed, 34 insertions, 9 deletions
@@ -115,7 +115,7 @@ class RDoc::ClassModule < RDoc::Context
# across multiple runs.
def add_comment comment, location
- return if comment.empty?
original = comment
@@ -328,7 +328,10 @@ class RDoc::ClassModule < RDoc::Context
@comment = @comment_location = document
end
- merge_collections attributes, class_module.attributes do |add, attr|
if add then
add_attribute attr
else
@@ -337,7 +340,7 @@ class RDoc::ClassModule < RDoc::Context
end
end
- merge_collections constants, class_module.constants do |add, const|
if add then
add_constant const
else
@@ -346,7 +349,7 @@ class RDoc::ClassModule < RDoc::Context
end
end
- merge_collections includes, class_module.includes do |add, incl|
if add then
add_include incl
else
@@ -354,7 +357,7 @@ class RDoc::ClassModule < RDoc::Context
end
end
- merge_collections method_list, class_module.method_list do |add, meth|
if add then
add_method meth
else
@@ -367,15 +370,37 @@ class RDoc::ClassModule < RDoc::Context
end
##
- # Merges collection +mine+ with +other+ preferring other.
-
- def merge_collections mine, other, &block # :nodoc:
my_things = mine. group_by { |thing| thing.file }
other_things = other.group_by { |thing| thing.file }
other_things.each do |file, things|
my_things[file].each { |thing| yield false, thing } if
- my_things.include? file
things.each do |thing|
yield true, thing