Sha256: 165403a1b3a6410c516f533021271109133d062dbe99bff181274b9c5988d416

Contents?: true

Size: 381 Bytes

Versions: 7

Compression:

Stored size: 381 Bytes

Contents

module Mail
  module Jdec
    module BodyPatch
      def decoded
        super
      rescue Mail::UnknownEncodingType => e
        if Jdec.enabled?
          Jdec::Decoder.force_utf8(raw_source)
        else
          raise e
        end
      end
    end
  end
end

unless Mail::Body.included_modules.include?(Mail::Jdec::BodyPatch)
  Mail::Body.prepend Mail::Jdec::BodyPatch
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mail-jdec-1.0.10 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.9 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.8 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.7 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.6 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.5 lib/mail/jdec/body_patch.rb
mail-jdec-1.0.4 lib/mail/jdec/body_patch.rb