From db704c39a4a2001c80eed2e80d60a7f1b7e49c83 Mon Sep 17 00:00:00 2001 From: nicholas evans Date: Sun, 12 Nov 2023 08:09:30 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20STATUS=20APPENDLIMIT=20(RFC78?= =?UTF-8?q?89,=20APPENDLIMIT)=20[=F0=9F=9A=A7=20WIP:=20tests,=20docs]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, any number-type status values worked—which is most of them. This adds support for `APPENDLIMIT`, which can also be `NIL`. --- lib/net/imap/response_parser.rb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/net/imap/response_parser.rb b/lib/net/imap/response_parser.rb index f120f9ba..e4507167 100644 --- a/lib/net/imap/response_parser.rb +++ b/lib/net/imap/response_parser.rb @@ -543,17 +543,10 @@ def resp_cond_state__name end # nstring = string / nil - def nstring - NIL? ? nil : string - end - - def nstring8 - NIL? ? nil : string8 - end - - def nquoted - NIL? ? nil : quoted - end + def nstring; NIL? ? nil : string end + def nstring8; NIL? ? nil : string8 end + def nquoted; NIL? ? nil : quoted end + def nil_or_number; NIL? ? nil : number end # use where nstring represents "LABEL" values def case_insensitive__nstring @@ -1590,6 +1583,7 @@ def status_att_val when "SIZE" then number64 # RFC8483, RFC9051 when "HIGHESTMODSEQ" then mod_sequence_valzer # RFC7162 when "MAILBOXID" then parens__objectid # RFC8474 + when "APPENDLIMIT" then nil_or_number # RFC7889 else number? || ExtensionData.new(tagged_ext_val) end