class RuboCop::Cop::Layout::HashAlignment

def correct_node(corrector, node, delta)

def correct_node(corrector, node, delta)
  # We can't use the instance variable inside the lambda. That would
  # just give each lambda the same reference and they would all get the
  # last value of each. A local variable fixes the problem.
  if node.value
    correct_key_value(corrector, delta, node.key.source_range,
                      node.value.source_range,
                      node.loc.operator)
  else
    delta_value = delta[:key] || 0
    correct_no_value(corrector, delta_value, node.source_range)
  end
end