Skip to content

Commit 663147b

Browse files
committed
📚 Minor updates for ANONYMOUS SASL rdoc
1 parent d362a9e commit 663147b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/net/imap/sasl/anonymous_authenticator.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AnonymousAuthenticator
2121
# #anonymous_message is an optional message which is sent to the server.
2222
# It may be sent as a positional argument or as a keyword argument.
2323
#
24-
# Any other keyword parameters are quietly ignored.
24+
# Any other keyword arguments are silently ignored.
2525
def initialize(anon_msg = nil, anonymous_message: nil, **)
2626
message = (anonymous_message || anon_msg || "").to_str
2727
@anonymous_message = StringPrep::Trace.stringprep_trace message
@@ -31,14 +31,15 @@ def initialize(anon_msg = nil, anonymous_message: nil, **)
3131
end
3232
end
3333

34-
# A token sent for the +ANONYMOUS+ mechanism.
34+
# An optional token sent for the +ANONYMOUS+ mechanism., up to 255 UTF-8
35+
# characters in length.
3536
#
3637
# If it contains an "@" sign, the message must be a valid email address
3738
# (+addr-spec+ from RFC-2822[https://tools.ietf.org/html/rfc2822]).
3839
# Email syntax is _not_ validated by AnonymousAuthenticator.
3940
#
4041
# Otherwise, it can be any UTF8 string which is permitted by the
41-
# StringPrep::Trace profile, up to 255 UTF-8 characters in length.
42+
# StringPrep::Trace profile.
4243
attr_reader :anonymous_message
4344

4445
# :call-seq:
@@ -48,7 +49,9 @@ def initialize(anon_msg = nil, anonymous_message: nil, **)
4849
def initial_response?; true end
4950

5051
# Returns #anonymous_message.
51-
def process(_server_challenge_string) anonymous_message end
52+
def process(_server_challenge_string)
53+
anonymous_message
54+
end
5255

5356
end
5457
end

0 commit comments

Comments
 (0)