public
Rubygem
Fork of lsegal/yard
Description: Official repository for YARD: Yay! A Ruby Documentation-tool.
Homepage: http://yard.soen.ca / IRC: #yard on irc.freenode.net
Clone URL: git://github.com/tmm1/yard.git
Fix minor parsing bugs in yard-graph
tmm1 (author)
Sun Jun 29 15:48:57 -0700 2008
commit  c508e500cdebafa97af5829324f472bb03be9300
tree    ad3ad944f2a793d2557b8ea1a2ecf2803ca5be4d
parent  6f1f6d2accc80ba13fa37b180258373ab085e389
...
60
61
62
63
 
64
65
66
...
60
61
62
 
63
64
65
66
0
@@ -60,7 +60,7 @@ module YARD
0
       
0
       def process_objects(object)
0
         @objects[object.path] = object
0
- @objects[object.superclass.path] = object.superclass if object.is_a?(CodeObjects::ClassObject)
0
+ @objects[object.superclass.path] = object.superclass if object.is_a?(CodeObjects::ClassObject) && object.superclass
0
         object.mixins.each {|o| @objects[o.path] = o }
0
 
0
         namespaces(object).each {|o| process_objects(o) }
...
1
2
 
 
3
4
5
...
 
 
1
2
3
4
5
0
@@ -1,5 +1,5 @@
0
-<% for obj in @objects.select {|o| CodeObjects::ClassObject === o && o.superclass != P(:Object) } %>
0
- <% [obj, obj.superclass].each do |o| %>
0
+<% for obj in @objects.select {|o| CodeObjects::ClassObject === o && o.superclass && o.superclass != P(:Object) } %>
0
+ <% [obj, obj.superclass].compact.each do |o| %>
0
     <% if o != Registry.root && (!o.respond_to?(:children) || !namespaces(o).empty?) %>
0
       <%= format_path o %> [label="{<%= o.type %> <%= o.path %>}" rank=sink];
0
     <% end %>

Comments

    No one has commented yet.