lib/yard/code_objects/class_object.rb in yard-0.5.2 vs lib/yard/code_objects/class_object.rb in yard-0.5.3
- old
+ new
@@ -118,10 +118,10 @@
@superclass = Proxy.new(namespace, object)
else
raise ArgumentError, "superclass must be CodeObject, Proxy, String or Symbol"
end
- if name == @superclass.name && namespace != YARD::Registry.root && object.is_a?(String)
+ if name == @superclass.name && namespace != YARD::Registry.root && !object.is_a?(Base)
@superclass = Proxy.new(namespace.namespace, object)
end
if @superclass == self
msg = "superclass #{@superclass.inspect} cannot be the same as the declared class #{self.inspect}"