Sha256: 0c33eb233f5ab12404c150a27ee3a3528232dcb7ae6ad516441f374f85815aba

Contents?: true

Size: 671 Bytes

Versions: 22

Compression:

Stored size: 671 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true
module Net
  class SMTP
    # This is a backport of r30294 from ruby trunk because of a bug in net/smtp.
    # http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30294
    #
    # Fixed in what will be Ruby 1.9.3 - tlsconnect also does not exist in some early versions of ruby
    begin
      alias_method :original_tlsconnect, :tlsconnect

      def tlsconnect(s)
        verified = false
        begin
          original_tlsconnect(s).tap { verified = true }
        ensure
          unless verified
            s.close rescue nil
          end
        end
      end
    rescue NameError
    end
  end
end

Version data entries

22 entries across 20 versions & 6 rubygems

Version Path
tdiary-5.0.6 vendor/bundle/gems/mail-2.6.6/lib/mail/core_extensions/smtp.rb
tdiary-5.0.5 vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
tdiary-5.0.5 vendor/bundle/gems/mail-2.6.6/lib/mail/core_extensions/smtp.rb
mail-2.6.6 lib/mail/core_extensions/smtp.rb
mail-2.6.6.rc1 lib/mail/core_extensions/smtp.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/mail-2.6.5/lib/mail/core_extensions/smtp.rb
mail-2.6.5 lib/mail/core_extensions/smtp.rb
mail-2.6.5.rc1 lib/mail/core_extensions/smtp.rb
tdiary-5.0.4 vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
abaci-0.3.0 vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
tdiary-5.0.2 vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb
tdiary-5.0.1 vendor/bundle/gems/mail-2.6.4/lib/mail/core_extensions/smtp.rb