lib/peddler/flat_file_parser.rb in peddler-1.6.1 vs lib/peddler/flat_file_parser.rb in peddler-1.6.2
- old
+ new
@@ -32,10 +32,10 @@
end
private
def scrub_body!(encoding)
- body.force_encoding(encoding) unless body.encoding == 'UTF-8'
+ body.force_encoding(encoding) unless body.encoding == Encoding::UTF_8
end
def extract_content_and_summary
@content = body.encode('UTF-8', invalid: :replace, undef: :replace)
@summary, @content = @content.split("\n\n") if @content.include?("\n\n")