lib/yard/handlers/ruby/extend_handler.rb in yard-0.6.1 vs lib/yard/handlers/ruby/extend_handler.rb in yard-0.6.2
- old
+ new
@@ -8,9 +8,12 @@
private
def process_mixin(mixin)
if mixin == s(:var_ref, s(:kw, "self"))
+ if namespace.is_a?(ClassObject)
+ raise UndocumentableError, "extend(self) statement on class"
+ end
namespace.mixins(scope) << namespace
else
super
end
end