Skip to content

Commit 4299df8

Browse files
committed
📚 Document SearchResult#to_sequence_set is sorted
This is, unfortunately, different from ESearchResult#to_sequence_set's behavior, since ESearchResult simply returns the SequenceSet as provided by the server. I would like to update this in a future release (perhaps 0.7).
1 parent a36d6eb commit 4299df8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/net/imap/search_result.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ def to_s(type = "SEARCH")
123123
# Net::IMAP::SearchResult[9, 1, 2, 4, 10, 12, 3, modseq: 123_456]
124124
# .to_sequence_set
125125
# # => Net::IMAP::SequenceSet["1:4,9:10,12"]
126+
#
127+
# >>>
128+
# *NOTE:* +SORT+ order is not preserved. The result will be sorted.
129+
#
126130
def to_sequence_set; empty? ? SequenceSet.empty : SequenceSet[to_a] end
127131

128132
def pretty_print(pp)

0 commit comments

Comments
 (0)