Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/net/imap/esearch_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ class IMAP
# Some search extensions may result in the server sending ESearchResult
# responses after the initiating command has completed. Use
# IMAP#add_response_handler to handle these responses.
#
# ==== Compatibility with SearchResult
#
# Note that both SearchResult and ESearchResult implement +each+, +to_a+,
# and +to_sequence_set+. These methods can be used regardless of whether
# the server returns +SEARCH+ or +ESEARCH+ data (or no data).
class ESearchResult < Data.define(:tag, :uid, :data)
def initialize(tag: nil, uid: nil, data: nil)
tag => String | nil; tag = -tag if tag
Expand Down
6 changes: 6 additions & 0 deletions lib/net/imap/search_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ class IMAP
# identifiers returned by Net::IMAP#uid_search.
#
# For backward compatibility, SearchResult inherits from Array.
#
# ==== Compatibility with ESearchResult
#
# Note that both SearchResult and ESearchResult implement +each+, +to_a+,
# and +to_sequence_set+. These methods can be used regardless of whether
# the server returns +SEARCH+ or +ESEARCH+ data (or no data).
class SearchResult < Array

# Returns a SearchResult populated with the given +seq_nums+.
Expand Down