class RuboCop::Cop::Style::BracesAroundHashParameters

def remove_braces_with_whitespace(corrector, node)

def remove_braces_with_whitespace(corrector, node)
  right_brace_and_space = right_brace_and_space(node.loc.end)
  if comment_on_line?(right_brace_and_space.line)
    # Removing a line break between a comment and the closing
    # parenthesis would cause a syntax error, so we only remove the
    # braces in that case.
    remove_braces(corrector, node)
  else
    left_brace_and_space = range_with_surrounding_space(node.loc.begin,
                                                        :right)
    corrector.remove(left_brace_and_space)
    corrector.remove(right_brace_and_space)
  end
end