Skip to content

Commit 1a81492

Browse files
committed
Forward keyword args and block from #authenticate
1 parent 72380ae commit 1a81492

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/net/smtp.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,10 @@ def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream
871871
# All arguments—other than +authtype+—are forwarded to the authenticator.
872872
# Different authenticators may interpret the +user+ and +secret+
873873
# arguments differently.
874-
def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
875-
check_auth_args authtype, user, secret
874+
def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE, **kwargs, &block)
875+
check_auth_args authtype, user, secret, **kwargs
876876
authenticator = Authenticator.auth_class(authtype).new(self)
877-
authenticator.auth(user, secret)
877+
authenticator.auth(user, secret, **kwargs, &block)
878878
end
879879

880880
private

0 commit comments

Comments
 (0)