class RuboCop::Cop::Lint::RedundantWithIndex

def on_block(node)

def on_block(node)
  redundant_with_index?(node) do |send|
    add_offense(node, location: with_index_range(send))
  end
end