mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rdoc/constant.rb: workaround of NoMethodError
* lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for NoMethodError when the original of alias is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7fff518d53
commit
50ffa683ca
1 changed files with 9 additions and 1 deletions
|
@ -63,7 +63,15 @@ class RDoc::Constant < RDoc::CodeObject
|
|||
# for a documented class or module.
|
||||
|
||||
def documented?
|
||||
super or is_alias_for && is_alias_for.documented?
|
||||
return true if super
|
||||
return false unless @is_alias_for
|
||||
case @is_alias_for
|
||||
when String then
|
||||
found = @store.find_class_or_module @is_alias_for
|
||||
return false unless found
|
||||
@is_alias_for = found
|
||||
end
|
||||
@is_alias_for.documented?
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue