class RuboCop::Cop::Style::FrozenStringLiteralComment
def autocorrect(node)
def autocorrect(node) lambda do |corrector| if style == :never corrector.remove(range_with_surrounding_space(node.pos, :right)) else last_special_comment = last_special_comment(processed_source) if last_special_comment.nil? corrector.insert_before(processed_source.tokens[0].pos, "#{FROZEN_STRING_LITERAL_ENABLED}\n") else corrector.insert_after(last_special_comment.pos, "\n#{FROZEN_STRING_LITERAL_ENABLED}") end end end end