<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>templates/default/html/module.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -18,20 +18,41 @@ ac.puts &lt;&lt;-eof
   &lt;body&gt;
   &lt;h3&gt;All Classes&lt;/h3&gt;
 eof
+am = File.open(&quot;doc/all-modules.html&quot;, &quot;w&quot;) 
+am.puts &lt;&lt;-eof
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;base target=&quot;main&quot; /&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+  &lt;h3&gt;All Modules&lt;/h3&gt;
+eof
 meths = []
 Namespace.all.sort.each do |path|
   object = Namespace.at(path)
-  if object.is_a?(MethodObject) &amp;&amp; object.visibility == :public
+  if object.is_a?(MethodObject) &amp;&amp; (object.visibility == :protected || object.visibility == :public)
     meths &lt;&lt; [object.name, object]
   end
   
-  next unless object.is_a? ClassObject
-  ac.puts &quot;&lt;a href='&quot; + path.gsub(&quot;::&quot;,&quot;_&quot;) + &quot;.html'&gt;&quot; + path + &quot;&lt;/a&gt;&lt;br /&gt;&quot;
+  indexfile = nil
+
+  case object
+  when ClassObject
+    indexfile = ac
+  when ModuleObject
+    indexfile = am
+  else
+    next
+  end
+  
+  indexfile.puts &quot;&lt;a href='&quot; + path.gsub(&quot;::&quot;,&quot;_&quot;) + &quot;.html'&gt;&quot; + path + &quot;&lt;/a&gt;&lt;br /&gt;&quot;
   puts &quot;Generating &quot; + (docfile = &quot;doc/#{path.gsub('::','_')}.html&quot;) + &quot;...&quot;
   File.open(docfile, &quot;w&quot;) {|f| f.write(object.to_s) }
 end
 ac.puts &quot;&lt;/body&gt;&lt;/html&gt;&quot;
 ac.close
+am.puts &quot;&lt;/body&gt;&lt;/html&gt;&quot;
+am.close
 
 File.open(&quot;doc/all-methods.html&quot;, &quot;w&quot;) do |f|
   f.puts &lt;&lt;-eof
@@ -41,7 +62,7 @@ File.open(&quot;doc/all-methods.html&quot;, &quot;w&quot;) do |f|
       &lt;/head&gt;
       &lt;body&gt;
       &lt;h3&gt;All Methods&lt;/h3&gt;
-eof
+  eof
   meths.sort {|a,b| a.first &lt;=&gt; b.first }.each do |name, object|
     f.puts &quot;&lt;a href='&quot; + object.parent.path.gsub(&quot;::&quot;, &quot;_&quot;) + &quot;.html##{object.scope}_method-#{name}'&gt;#{name}&lt;/a&gt;&lt;br /&gt;&quot;
   end
@@ -63,8 +84,9 @@ File.open(&quot;doc/index.html&quot;, &quot;w&quot;) do |f|
       &lt;title&gt;Ruby Classes&lt;/title&gt;
     &lt;/head&gt;
     &lt;frameset cols=&quot;250,*&quot;&gt;
-      &lt;frameset rows=&quot;*,40%&quot;&gt;
+      &lt;frameset rows=&quot;40%,40%,20%&quot;&gt;
         &lt;frame src=&quot;all-classes.html&quot;&gt;
+        &lt;frame src=&quot;all-modules.html&quot;&gt;
         &lt;frame src=&quot;all-methods.html&quot;&gt;
       &lt;/frameset&gt;
       &lt;frame name=&quot;main&quot; src=&quot;#{main_page}&quot;&gt;</diff>
      <filename>bin/yardoc</filename>
    </modified>
    <modified>
      <diff>@@ -131,7 +131,7 @@ module YARD #:nodoc:
     #
     #
     def path
-      [(parent.path if parent &amp;&amp; parent.type != :root), name].join(scope == :instance ? &quot;#&quot; : &quot;::&quot;).gsub(/^::/, '')
+      [(parent.path if parent &amp;&amp; parent.type != :root), name].join(scope == :instance ? &quot;#&quot; : &quot;::&quot;).gsub(/^::/, '').strip
     end
     
     ## 
@@ -221,6 +221,7 @@ module YARD #:nodoc:
   class CodeObjectWithMethods &lt; CodeObject
     def initialize(name, type, parent = nil, comments = nil)
       super(name, type, :public, :class, parent, comments) do |obj|
+        obj[:attributes] = {}
         obj[:instance_methods] = {}
         obj[:class_methods] = {}
         obj[:constants] = {}
@@ -255,6 +256,11 @@ module YARD #:nodoc:
         yield(obj) if block_given?
       end
     end
+    
+    def superclasses
+      #STDERR.puts &quot;Warning: someone expected module #{path} to respond to #superclasses&quot;
+      []
+    end
   end
 
   class ClassObject &lt; CodeObjectWithMethods
@@ -262,7 +268,6 @@ module YARD #:nodoc:
     
     def initialize(name, superclass = BASE_OBJECT, *args)
       super(name, :class, *args) do |obj|
-        obj[:attributes] = {}
         obj[:superclass] = superclass
         yield(obj) if block_given?
       end
@@ -282,8 +287,9 @@ module YARD #:nodoc:
     
     def superclasses
       superobject = Namespace.find_from_path(path, superclass)
-      return [superclass] unless superobject.respond_to? :superclasses
-      [superobject.path] + (superobject.path == 'Object' ? [] : superobject.superclasses)
+      return [&quot;Object&quot;] unless superobject
+      return [] if path == superobject.path
+      [superobject.path, *superobject.superclasses]
     end
     
     def inheritance_tree
@@ -298,7 +304,8 @@ module YARD #:nodoc:
     # @param [CodeObjectWithMethods] parent the object that holds this method
     def initialize(name, visibility, scope, parent, comments = nil)
       super(name, :method, visibility, scope, parent, comments) do |obj|
-        parent[&quot;#{scope}_methods&quot;.to_sym].update(name.to_s =&gt; obj)
+        pmethods = parent[&quot;#{scope}_methods&quot;.to_sym]
+        pmethods.update(name.to_s =&gt; obj) if pmethods
         yield(obj) if block_given?
       end
     end</diff>
      <filename>lib/code_object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,6 +38,10 @@ module YARD
       filename = File.join(template_directory, template.to_s, format.to_s, &quot;#{type}.erb&quot;)
       Erubis::Eruby.new(&quot;&lt;% extend #{format.to_s.capitalize}Formatter %&gt;\n&quot; + 
                 IO.read(filename), :trim =&gt; true).result(_binding)
+    rescue =&gt; e
+      STDERR.puts &quot;Could not render template #{filename}: #{e.message}&quot;
+      STDERR.puts e.backtrace[0, 5].map {|x| &quot;\t#{x}&quot; }
+      STDERR.puts
     end
   end
   </diff>
      <filename>lib/formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class YARD::ConstantHandler &lt; YARD::CodeObjectHandler
-  HANDLER_MATCH = /\A[^@\$]\S*\s*=\s*/m
+  HANDLER_MATCH = /\A[^@\$]\S*\s*=[^=]\s*/m
   handles HANDLER_MATCH
   
   def process</diff>
      <filename>lib/handlers/constant_handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@ class YARD::MixinHandler &lt; YARD::CodeObjectHandler
     rescue NameError
       object.mixins.push statement.tokens[1..-1].to_s
     end
+    object.mixins.map! {|mixin| mixin.strip }
     object.mixins.flatten!
     object.mixins.uniq!
   end</diff>
      <filename>lib/handlers/mixin_handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,3 @@
-require &quot;e2mmap&quot;
-require &quot;irb/slex&quot;
-
 module YARD
   module RubyToken
     EXPR_BEG   = :EXPR_BEG
@@ -90,9 +87,6 @@ module YARD
       case token
       when String, Symbol
         source = token.kind_of?(String) ? TkReading2Token : TkSymbol2Token
-        if (tk = source[token]).nil?
-        	IRB.fail TkReading2TokenNoKey, token
-        end
         tk = Token(tk[0], value) 
       else 
         tk = if (token.ancestors &amp; [TkId, TkVal, TkOPASGN, TkUnknownChar]).empty?
@@ -245,18 +239,12 @@ module YARD
 
     def RubyToken.def_token(token_n, super_token = Token, reading = nil, *opts)
       token_n = token_n.id2name unless token_n.kind_of?(String)
-      if RubyToken.const_defined?(token_n)
-        #IRB.fail AlreadyDefinedToken, token_n
-      end
 
       token_c =  Class.new super_token
       RubyToken.const_set token_n, token_c
   #    token_c.inspect
  
       if reading
-        if TkReading2Token[reading]
-  	      IRB.fail TkReading2TokenDuplicateError, token_n, reading
-        end
         if opts.empty?
   	      TkReading2Token[reading] = [token_c]
         else
@@ -411,7 +399,6 @@ module YARD
     def_exception(:SyntaxError, &quot;%s&quot;)
   
     include RubyToken
-    include IRB
 
     attr_reader :continue
     attr_reader :lex_state</diff>
      <filename>lib/ruby_lex.rb</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,10 @@ module YARD
               begin
                 handler.new(self, stmt).process
               rescue =&gt; e
-                raise &quot;Handler error: #{e} in #{file}:#{stmt.tokens.first.line_no}&quot;
+                STDERR.puts &quot;#{handler.to_s} error in `#{file}`:#{stmt.tokens.first.line_no}: #{stmt.tokens.to_s}&quot;
+                STDERR.puts &quot;Exception message: #{e.message}&quot;
+                STDERR.puts e.backtrace[0, 5]
+                STDERR.puts
               end
             end
           end</diff>
      <filename>lib/source_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module YARD
-  VERSION = &quot;0.2.0&quot;
+  VERSION = &quot;0.2.1&quot;
 end
 
 require File.dirname(__FILE__) + '/logger'</diff>
      <filename>lib/yard.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,13 +21,17 @@
     td { padding: 3px; }
     &lt;/style&gt;
   &lt;base target=&quot;_self&quot; /&gt;
-  &lt;/head&gt;
+  &lt;/head
   &lt;body&gt;
     &lt;h1&gt;Class &lt;%= path %&gt;&lt;/h1&gt;
+&lt;% unless superclasses.empty? %&gt;
 &lt;pre&gt;
 &lt;% spaces = 0 -%&gt;
-&lt;% superclasses.reverse.each do |superclass| -%&gt;&lt;%= (&quot; &quot; * spaces) + (spaces &gt; 0 ? &quot;+--&quot; : &quot;&quot;) + link_to_path(superclass) + &quot;\n&quot; %&gt;&lt;% spaces += (spaces == 0 ? 2 : 4) -%&gt;&lt;%= (&quot; &quot; * spaces) + &quot;|\n&quot; %&gt;&lt;% end -%&gt;&lt;%= (&quot; &quot; * spaces ) + &quot;+--&quot; + path %&gt;
+&lt;% superclasses.reverse.each do |superclass| -%&gt;&lt;%= (&quot; &quot; * spaces) + (spaces &gt; 0 ? &quot;+--&quot; : &quot;&quot;) + link_to_path(superclass) %&gt;
+&lt;% spaces += (spaces == 0 ? 2 : 4) -%&gt;&lt;%= (&quot; &quot; * spaces) + &quot;|&quot; %&gt;
+&lt;% end -%&gt;&lt;%= (&quot; &quot; * spaces ) + &quot;+--&quot; + path %&gt;
 &lt;/pre&gt; 
+&lt;% end %&gt;
     
     &lt;% unless mixins.empty? %&gt;
     &lt;p&gt;
@@ -200,7 +204,7 @@
             &lt;/th&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
-            &lt;td&gt;&lt;%= meths.reject {|name, m| superclass.send(&quot;#{scope}_methods&quot;).has_key? name }.
+            &lt;td&gt;&lt;%= superclass.send(&quot;#{scope}_methods&quot;).reject {|name, m| meths.include? name }.
               collect {|name, m| &quot;&lt;tt&gt;&quot; + link_to_path(superclass.path + (scope == :instance ? &quot;#&quot; : &quot;::&quot;) + 
                           name, nil, name) + &quot;&lt;/tt&gt;&quot; }.join(&quot;, &quot;) %&gt;&lt;/td&gt;
           &lt;/tr&gt;</diff>
      <filename>templates/default/html/class.erb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>doc/Logger.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyLex.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyLex_BufferedReader.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkError.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkId.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkKW.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkNode.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkOPASGN.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkOp.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkUnknownChar.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_TkVal.html</filename>
    </removed>
    <removed>
      <filename>doc/RubyToken_Token.html</filename>
    </removed>
    <removed>
      <filename>doc/TestCodeObject.html</filename>
    </removed>
    <removed>
      <filename>doc/TestNamespace.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_AttributeHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_AuthorTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_BaseTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_BaseTypeTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ClassHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ClassObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ClassVariableHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ClassVariableObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_CodeObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_CodeObjectHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_CodeObjectWithMethods.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ConstantHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ConstantObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_DeprecatedTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ExceptionHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_Formatter.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_MethodHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_MethodObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_MixinHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ModuleHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ModuleObject.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_NameStruct.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_Namespace.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ParamTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_QuickDoc.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_ReturnTag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyLex.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyLex_BufferedReader.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkError.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkId.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkKW.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkNode.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkOPASGN.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkOp.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkUnknownChar.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_TkVal.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_RubyToken_Token.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_SourceParser.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_Statement.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_StatementList.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_Tag.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_TokenList.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_VisibilityHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/YARD_YieldHandler.html</filename>
    </removed>
    <removed>
      <filename>doc/all-classes.html</filename>
    </removed>
    <removed>
      <filename>doc/all-methods.html</filename>
    </removed>
    <removed>
      <filename>doc/index.html</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>aac637c8e89535800e27760d334e7cc7c2869843</id>
    </parent>
  </parents>
  <author>
    <name>loren</name>
    <email>loren@a99b2113-df67-db11-8bcc-000c76553aea</email>
  </author>
  <url>http://github.com/lsegal/yard/commit/2b8a715f61201f6bf2a6033a26137d41bc677409</url>
  <id>2b8a715f61201f6bf2a6033a26137d41bc677409</id>
  <committed-date>2008-02-24T11:13:00-08:00</committed-date>
  <authored-date>2008-02-24T11:13:00-08:00</authored-date>
  <message>Tag 0.2.1

git-svn-id: http://soen.ca/svn/projects/ruby/yard/tags/0.2.1@801 a99b2113-df67-db11-8bcc-000c76553aea</message>
  <tree>746424c20ae14582f7810e7f03c8335b4adc516f</tree>
  <committer>
    <name>loren</name>
    <email>loren@a99b2113-df67-db11-8bcc-000c76553aea</email>
  </committer>
</commit>
