Skip to content

Commit 87ba74e

Browse files
committed
📚 Fix #response documentation error
`Net::IMAP#response` only stores non-nil `#data`, not the entire object.
1 parent 602b1e7 commit 87ba74e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/net/imap.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,8 @@ module Net
511511
#
512512
# - #greeting: The server's initial untagged response, which can indicate a
513513
# pre-authenticated connection.
514-
# - #responses: The untagged responses, as a hash. Keys are the untagged
515-
# response type (e.g. "OK", "FETCH", "FLAGS") and response code (e.g.
516-
# "ALERT", "UIDVALIDITY", "UIDNEXT", "TRYCREATE", etc). Values are arrays
517-
# of UntaggedResponse or ResponseCode.
514+
# - #responses: A hash with arrays of unhandled <em>non-+nil+</em>
515+
# UntaggedResponse and ResponseCode +#data+, keyed by +#name+.
518516
# - #add_response_handler: Add a block to be called inside the receiver thread
519517
# with every server response.
520518
# - #remove_response_handler: Remove a previously added response handler.
@@ -712,7 +710,9 @@ class IMAP < Protocol
712710
# Returns the initial greeting the server, an UntaggedResponse.
713711
attr_reader :greeting
714712

715-
# Returns recorded untagged responses.
713+
# Returns a hash with arrays of unhandled <em>non-+nil+</em>
714+
# UntaggedResponse#data keyed by UntaggedResponse#name, and
715+
# ResponseCode#data keyed by ResponseCode#name.
716716
#
717717
# For example:
718718
#

0 commit comments

Comments
 (0)