Skip to content

Commit 157b528

Browse files
committed
📚 Fix documentation for #fetch
The rdoc for the `set` argument incorrectly described how `MessageSet` previously handled it, not how `SequenceSet` currently handles it. Also, `Related:` incorrectly pointed to `#uid_search`, not `#uid_fetch`. The rdoc for `#uid_fetch` was also updated, in preparation for `PARTIAL` support.
1 parent 3d3f658 commit 157b528

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/net/imap.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,14 +2357,9 @@ def uid_search(...)
23572357
# Sends a {FETCH command [IMAP4rev1 §6.4.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.5]
23582358
# to retrieve data associated with a message in the mailbox.
23592359
#
2360-
# The +set+ parameter is a number or a range between two numbers,
2361-
# or an array of those. The number is a message sequence number,
2362-
# where -1 represents a '*' for use in range notation like 100..-1
2363-
# being interpreted as '100:*'. Beware that the +exclude_end?+
2364-
# property of a Range object is ignored, and the contents of a
2365-
# range are independent of the order of the range endpoints as per
2366-
# the protocol specification, so 1...5, 5..1 and 5...1 are all
2367-
# equivalent to 1..5.
2360+
# +set+ is the message sequence numbers to fetch, and may be any valid input
2361+
# to {SequenceSet[...]}[rdoc-ref:SequenceSet@Creating+sequence+sets].
2362+
# (For UIDs, use #uid_fetch instead.)
23682363
#
23692364
# +attr+ is a list of attributes to fetch; see the documentation
23702365
# for FetchData for a list of valid attributes.
@@ -2374,7 +2369,7 @@ def uid_search(...)
23742369
#
23752370
# The return value is an array of FetchData.
23762371
#
2377-
# Related: #uid_search, FetchData
2372+
# Related: #uid_fetch, FetchData
23782373
#
23792374
# ==== For example:
23802375
#
@@ -2413,17 +2408,22 @@ def fetch(set, attr, mod = nil, changedsince: nil)
24132408
# Sends a {UID FETCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8]
24142409
# to retrieve data associated with a message in the mailbox.
24152410
#
2416-
# Similar to #fetch, but the +set+ parameter contains unique identifiers
2417-
# instead of message sequence numbers.
2411+
# +set+ is the message UIDs to fetch, and may be any valid input to
2412+
# {SequenceSet[...]}[rdoc-ref:SequenceSet@Creating+sequence+sets].
2413+
# (For message sequence numbers, use #fetch instead.)
24182414
#
2415+
# +attr+ behaves the same as with #fetch.
24192416
# >>>
24202417
# *Note:* Servers _MUST_ implicitly include the +UID+ message data item as
24212418
# part of any +FETCH+ response caused by a +UID+ command, regardless of
24222419
# whether a +UID+ was specified as a message data item to the +FETCH+.
24232420
#
2421+
# +changedsince+ (optional) behaves the same as with #fetch.
2422+
#
24242423
# Related: #fetch, FetchData
24252424
#
24262425
# ==== Capabilities
2426+
#
24272427
# Same as #fetch.
24282428
def uid_fetch(set, attr, mod = nil, changedsince: nil)
24292429
fetch_internal("UID FETCH", set, attr, mod, changedsince: changedsince)

0 commit comments

Comments
 (0)