class RuboCop::Cop::Style::EmptyLiteral
def replacement_range(node)
def replacement_range(node) if hash_node(node) && first_argument_unparenthesized?(node) # `some_method {}` is not same as `some_method Hash.new` # because the braces are interpreted as a block. We will have # to rewrite the arguments to wrap them in parenthesis. args = node.parent.arguments range_between(args[0].source_range.begin_pos - 1, args[-1].source_range.end_pos) else node.source_range end end