If two ruby methods share a C implementation (and comment) this
deduplicates the examples in the call_seq for the method to reduce
confusion in the output.
# File lib/rdoc/parser/c.rb, line 236
def deduplicate_method_name class_obj, method_name # :nodoc:
return unless
method = class_obj.method_list.find { |m| m.name == method_name }
return unless call_seq = method.call_seq
method_name = method_name[0, 1] if method_name =~ /\A\[/
entries = call_seq.split "\n"
matching = entries.select do |entry|
entry =~ /^\w*\.?#{Regexp.escape method_name}/ or
entry =~ /\s#{Regexp.escape method_name}\s/
end
method.call_seq = matching.join "\n"
end