Skip to content

Commit

Permalink
Import r43006 from ruby trunk
Browse files Browse the repository at this point in the history
> rdoc/constant.rb: workaround of NoMethodError
>
> * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
>   NoMethodError when the original of alias is not found.
  • Loading branch information
drbrain committed Dec 3, 2013
1 parent 900de99 commit a883e14
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/rdoc/constant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ def == other
# 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

##
Expand Down

0 comments on commit a883e14

Please sign in to comment.