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

ruby-changes:31888

From: nobu <ko1@a...>
Date: Tue, 3 Dec 2013 12:19:03 +0900 (JST)
Subject: [ruby-changes:31888] nobu:r43967 (trunk): rdoc/constant.rb: reapply r43006 for workaround of

nobu	2013-12-03 12:18:52 +0900 (Tue, 03 Dec 2013)

  New Revision: 43967

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

  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 43966)
+++ ChangeLog	(revision 43967)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Dec  3 12:17:59 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
+	  NoMethodError when the original of alias is not found.
+
 Tue Dec  3 10:43:58 2013  Eric Hodel  <drbrain@s...>
 
 	* ext/openssl/lib/openssl/buffering.rb:  Return ASCII-8BIT strings from
Index: lib/rdoc/constant.rb
===================================================================
--- lib/rdoc/constant.rb	(revision 43966)
+++ lib/rdoc/constant.rb	(revision 43967)
@@ -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/

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