lib/rubocop/cop/corrector.rb in rubocop-0.83.0 vs lib/rubocop/cop/corrector.rb in rubocop-0.84.0

- old
+ new

@@ -83,12 +83,10 @@ # @param [Parser::Source::Range, Rubocop::AST::Node] range or node # @param [String] content def insert_before(node_or_range, content) range = to_range(node_or_range) # TODO: Fix Cops using bad ranges instead - if range.end_pos > @source_buffer.source.size - range = range.with(end_pos: @source_buffer.source.size) - end + range = range.with(end_pos: @source_buffer.source.size) if range.end_pos > @source_buffer.source.size @source_rewriter.insert_before(range, content) end # Inserts new code after the given source range.