class RuboCop::Cop::Performance::Sum
def build_block_bad_method(method, init, var_acc, var_elem, body)
def build_block_bad_method(method, init, var_acc, var_elem, body) bad_method = method.to_s unless init.empty? init = init.first bad_method += "(#{init.source})" end bad_method += " { |#{var_acc}, #{var_elem}| #{body.source} }" bad_method end