Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtm committed Sep 20, 2023
1 parent 531c797 commit 165c704
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/net/smtp.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# = net/smtp.rb
#
# Copyright (c) 1999-2007 Yukihiro Matsumoto.
Expand All @@ -22,7 +23,6 @@
end

module Net

# Module mixed in to all SMTP error classes
module SMTPError
# This *class* is a module for backward compatibility.
Expand All @@ -36,7 +36,7 @@ def initialize(response, message: nil)
@message = message
else
@response = nil
@message = message || response
@message = message || response
end
end

Expand Down Expand Up @@ -210,7 +210,7 @@ class << self

def SMTP.default_ssl_context(ssl_context_params = nil)
context = OpenSSL::SSL::SSLContext.new
context.set_params(ssl_context_params ? ssl_context_params : {})
context.set_params(ssl_context_params || {})
context
end

Expand Down Expand Up @@ -281,7 +281,7 @@ def inspect
attr_accessor :esmtp

# +true+ if the SMTP object uses ESMTP (which it does by default).
alias :esmtp? :esmtp
alias esmtp? esmtp

# true if server advertises STARTTLS.
# You cannot get valid value before opening SMTP session.
Expand Down Expand Up @@ -829,8 +829,6 @@ def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream
# Authentication
#

public

DEFAULT_AUTH_TYPE = :plain

def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
Expand Down Expand Up @@ -1130,11 +1128,9 @@ def to_s
@address
end
end

end # class SMTP

SMTPSession = SMTP # :nodoc:

end

require_relative 'smtp/authenticator'
Expand Down

0 comments on commit 165c704

Please sign in to comment.