1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc.rb: Updated to RDoc 3.6

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-05-14 00:39:16 +00:00
parent fe89874540
commit 0b6da24a5e
28 changed files with 593 additions and 97 deletions

View file

@ -137,12 +137,22 @@ class RDoc::ClassModule < RDoc::Context
remove_invisible min_visibility
end
##
# Iterates the ancestors of this class or module for which an
# RDoc::ClassModule exists.
def each_ancestor # :yields: module
ancestors.each do |mod|
next if String === mod
yield mod
end
end
##
# Looks for a symbol in the #ancestors. See Context#find_local_symbol.
def find_ancestor_local_symbol symbol
ancestors.each do |m|
next if m.is_a?(String)
each_ancestor do |m|
res = m.find_local_symbol(symbol)
return res if res
end
@ -263,7 +273,7 @@ class RDoc::ClassModule < RDoc::Context
class_module.each_attribute do |attr|
if match = attributes.find { |a| a.name == attr.name } then
match.rw = [match.rw, attr.rw].compact.join
match.rw = [match.rw, attr.rw].compact.uniq.join
else
add_attribute attr
end