[前][次][番号順一覧][スレッド一覧]

ruby-changes:30927

From: nobu <ko1@a...>
Date: Sat, 21 Sep 2013 14:15:23 +0900 (JST)
Subject: [ruby-changes:30927] nobu:r43006 (trunk): rdoc/constant.rb: workaround of NoMethodError

nobu	2013-09-21 14:15:17 +0900 (Sat, 21 Sep 2013)

  New Revision: 43006

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43006

  Log:
    rdoc/constant.rb: workaround of NoMethodError
    
    * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
      NoMethodError when the original of alias is not found.

  Modified files:
    trunk/lib/rdoc/constant.rb
Index: lib/rdoc/constant.rb
===================================================================
--- lib/rdoc/constant.rb	(revision 43005)
+++ lib/rdoc/constant.rb	(revision 43006)
@@ -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/

[前][次][番号順一覧][スレッド一覧]