Skip to content

Commit 305d229

Browse files
committed
Forward keyword args and block from #authenticate
1 parent a0075eb commit 305d229

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
@@ -869,10 +869,10 @@ def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream
869869
# All arguments-other than +authtype+-are forwarded to the authenticator.
870870
# Different authenticators may interpret the +user+ and +secret+
871871
# arguments differently.
872-
def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
873-
check_auth_args authtype, user, secret
872+
def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE, **kwargs, &block)
873+
check_auth_args authtype, user, secret, **kwargs
874874
authenticator = Authenticator.auth_class(authtype).new(self)
875-
authenticator.auth(user, secret)
875+
authenticator.auth(user, secret, **kwargs, &block)
876876
end
877877

878878
private

0 commit comments

Comments
 (0)