diff --git a/lib/yard/cli/stats.rb b/lib/yard/cli/stats.rb index 205fe2668..61d9438d5 100644 --- a/lib/yard/cli/stats.rb +++ b/lib/yard/cli/stats.rb @@ -128,7 +128,7 @@ def stats_for_constants # Statistics for methods def stats_for_methods objs = all_objects.select {|m| m.type == :method } - objs.reject! {|m| m.is_alias? || !m.is_explicit? } + objs.reject! {|m| m.is_alias? } undoc = objs.select {|m| m.docstring.blank? } @undoc_list |= undoc if @undoc_list output "Methods", objs.size, undoc.size diff --git a/lib/yard/handlers/c/handler_methods.rb b/lib/yard/handlers/c/handler_methods.rb index 1026b6829..0d8d21912 100644 --- a/lib/yard/handlers/c/handler_methods.rb +++ b/lib/yard/handlers/c/handler_methods.rb @@ -55,6 +55,7 @@ def handle_method(scope, var_name, name, func_name, source_file = nil) register MethodObject.new(namespace, name, scope) do |obj| register_visibility(obj, visibility) find_method_body(obj, func_name) + obj.explicit = true obj.add_tag(Tags::Tag.new(:return, '', 'Boolean')) if name =~ /\?$/ end end