class RuboCop::Cop::Performance::Sum

def build_good_method(init, block_pass = nil)

def build_good_method(init, block_pass = nil)
  good_method = 'sum'
  args = []
  unless init.empty?
    init = init.first
    args << init.source unless init.int_type? && init.value.zero?
  end
  args << block_pass.source if block_pass
  good_method += "(#{args.join(', ')})" unless args.empty?
  good_method
end