Skip to content

Commit

Permalink
📚 Fix #response documentation error
Browse files Browse the repository at this point in the history
`Net::IMAP#response` only stores non-nil `#data`, not the entire object.
  • Loading branch information
nevans committed Dec 23, 2022
1 parent 602b1e7 commit 87ba74e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,8 @@ module Net
#
# - #greeting: The server's initial untagged response, which can indicate a
# pre-authenticated connection.
# - #responses: The untagged responses, as a hash. Keys are the untagged
# response type (e.g. "OK", "FETCH", "FLAGS") and response code (e.g.
# "ALERT", "UIDVALIDITY", "UIDNEXT", "TRYCREATE", etc). Values are arrays
# of UntaggedResponse or ResponseCode.
# - #responses: A hash with arrays of unhandled <em>non-+nil+</em>
# UntaggedResponse and ResponseCode +#data+, keyed by +#name+.
# - #add_response_handler: Add a block to be called inside the receiver thread
# with every server response.
# - #remove_response_handler: Remove a previously added response handler.
Expand Down Expand Up @@ -712,7 +710,9 @@ class IMAP < Protocol
# Returns the initial greeting the server, an UntaggedResponse.
attr_reader :greeting

# Returns recorded untagged responses.
# Returns a hash with arrays of unhandled <em>non-+nil+</em>
# UntaggedResponse#data keyed by UntaggedResponse#name, and
# ResponseCode#data keyed by ResponseCode#name.
#
# For example:
#
Expand Down

0 comments on commit 87ba74e

Please sign in to comment.