Sha256: 69f2be8204ca76bcd8fc699d8f74c0ff959a6d82df1d6149c3925a7fc5d6a767

Contents?: true

Size: 655 Bytes

Versions: 16

Compression:

Stored size: 655 Bytes

Contents

require 'yaml'

module Mail
  module YAML
    def self.load(yaml)
      permitted_classes = [
        Symbol,

        Mail::Body,

        # Delivery methods as listed in mail/configuration.rb
        Mail::SMTP,
        Mail::Sendmail,
        Mail::Exim,
        Mail::FileDelivery,
        Mail::SMTPConnection,
        Mail::TestMailer,
        Mail::LoggerDelivery,

        Mail.delivery_method.class,
      ]

      if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
        ::YAML.safe_load(yaml, :permitted_classes => permitted_classes)
      else
        ::YAML.safe_load(yaml, permitted_classes)
      end
    end
  end
end

Version data entries

16 entries across 15 versions & 6 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/mail-2.8.1/lib/mail/yaml.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/yaml.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/yaml.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/yaml.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/yaml.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/yaml.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/yaml.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/yaml.rb
mail-2.8.1 lib/mail/yaml.rb
mail-2.8.1.rc2 lib/mail/yaml.rb
mail-2.8.0.1 lib/mail/yaml.rb
mail-2.8.0.1.rc1 lib/mail/yaml.rb
mail-2.8.0 lib/mail/yaml.rb
mail-2.8.0.rc3 lib/mail/yaml.rb
mail-2.8.0.rc2 lib/mail/yaml.rb
mail-2.8.0.rc1 lib/mail/yaml.rb