ruby-changes:31650
From: nobu <ko1@a...>
Date: Wed, 20 Nov 2013 01:39:14 +0900 (JST)
Subject: [ruby-changes:31650] nobu:r43729 (trunk): rdoc/constant.rb: reapply r43006 for workaround of NoMethodError
nobu 2013-11-20 01:39:07 +0900 (Wed, 20 Nov 2013) New Revision: 43729 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43729 Log: rdoc/constant.rb: reapply r43006 for workaround of NoMethodError * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for NoMethodError when the original of alias is not found. Modified files: trunk/ChangeLog trunk/lib/rdoc/constant.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 43728) +++ ChangeLog (revision 43729) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Nov 20 01:39:02 2013 Nobuyoshi Nakada <nobu@r...> + + * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for + NoMethodError when the original of alias is not found. + Wed Nov 20 01:27:33 2013 Nobuyoshi Nakada <nobu@r...> * lib/delegate.rb (Delegator#send): separate from method_missing so Index: lib/rdoc/constant.rb =================================================================== --- lib/rdoc/constant.rb (revision 43728) +++ lib/rdoc/constant.rb (revision 43729) @@ -63,7 +63,15 @@ class RDoc::Constant < RDoc::CodeObject https://github.com/ruby/ruby/blob/trunk/lib/rdoc/constant.rb#L63 # 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 ## -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/