lib/mailtrap/attachment.rb in mailtrap-2.0.0 vs lib/mailtrap/attachment.rb in mailtrap-2.1.0
- old
+ new
@@ -38,10 +38,10 @@
private
def encode(io)
string = io.read.encode('UTF-8') unless io.respond_to?(:binmode?) && io.binmode?
- Base64.encode64(string).gsub(/\n/, '')
+ Base64.encode64(string).gsub("\n", '')
end
def base64?(string)
string.is_a?(String) && Base64.strict_encode64(Base64.decode64(string)) == string
end