Skip to content

Commit 6638c64

Browse files
committed
📖 Tweak the ENABLE documentation
1 parent 9caff31 commit 6638c64

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

lib/net/imap.rb

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,9 @@ module Net
257257
# In addition to the universal commands, the following commands are valid in
258258
# the "_authenticated_" state:
259259
#
260-
#--
261-
# - #enable: <em>Not implemented by Net::IMAP, yet.</em>
260+
# - #enable: Enables backwards incompatible server extensions.
262261
#
263262
# <em>Requires the +ENABLE+ capability.</em>
264-
#++
265263
# - #select: Open a mailbox and enter the "_selected_" state.
266264
# - #examine: Open a mailbox read-only, and enter the "_selected_" state.
267265
# - #create: Creates a new mailbox.
@@ -331,12 +329,11 @@ module Net
331329
#
332330
# Although IMAP4rev2[https://tools.ietf.org/html/rfc9051] is <em>not supported
333331
# yet</em>, Net::IMAP supports several extensions that have been folded into
334-
# it: +IDLE+, +MOVE+, +NAMESPACE+, +UIDPLUS+, and +UNSELECT+.
332+
# it: +ENABLE+, +IDLE+, +MOVE+, +NAMESPACE+, +UIDPLUS+, and +UNSELECT+.
335333
#--
336334
# TODO: RFC4466, ABNF extensions (automatic support for other extensions)
337335
# TODO: +ESEARCH+, ExtendedSearchData
338336
# TODO: +SEARCHRES+,
339-
# TODO: +ENABLE+,
340337
# TODO: +SASL-IR+,
341338
# TODO: +LIST-EXTENDED+,
342339
# TODO: +LIST-STATUS+,
@@ -435,6 +432,11 @@ module Net
435432
# TODO...
436433
#++
437434
#
435+
# ==== RFC5161: +ENABLE+
436+
# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051], so it is also
437+
# listed with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands].
438+
# - #enable: Enables backwards incompatible server extensions.
439+
#
438440
#--
439441
# ==== RFC5182 +SEARCHRES+
440442
# TODO...
@@ -1882,17 +1884,22 @@ def uid_thread(algorithm, search_keys, charset)
18821884
# Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1]
18831885
# {[IMAP4rev2 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.1]
18841886
# to enable the specified extenstions, which may be either an
1885-
# array or a string.
1887+
# array or a string. Returns a list of the extensions that were enabled.
18861888
#
18871889
# Some of the extensions that use ENABLE permit the server to send
18881890
# syntax that this class cannot parse. Caution is advised.
18891891
#
1892+
# The +ENABLE+ command is only valid in the _authenticated_ state, before
1893+
# any mailbox is selected.
1894+
#
18901895
# ===== Capabilities
18911896
#
18921897
# The server's capabilities must include +ENABLE+
18931898
# [RFC5161[https://tools.ietf.org/html/rfc5161]] or IMAP4REV2
18941899
# [RFC9051[https://tools.ietf.org/html/rfc9051]].
1895-
1900+
#
1901+
# Additionally, the server capabilities must include a capability matching
1902+
# each enabled extension (usually the same name as the enabled extension).
18961903
def enable(extensions)
18971904
synchronize do
18981905
send_command("ENABLE #{[extensions].flatten.join(' ')}")

0 commit comments

Comments
 (0)