summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-21 05:15:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-21 05:15:17 +0000
commit50ffa683ca7b6de15f25392b8838d49d2e3cc750 (patch)
treeeb0e00afede6e7c76c877480b23833cdc49f33f9
parent7fff518d533b5a9aca3be62bf5af7c85ef1ca485 (diff)
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
-rw-r--r--lib/rdoc/constant.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/rdoc/constant.rb b/lib/rdoc/constant.rb
index 48b32aa..97985cb 100644
--- a/lib/rdoc/constant.rb
+++ b/lib/rdoc/constant.rb
@@ -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
##