Skip to content

Commit

Permalink
🐛 Fix typo in rarely used parser code
Browse files Browse the repository at this point in the history
I believe this code is only executed when there is something strange
(generally invalid) in the server's response.  Some of the newly added
invalid BODYSTRUCTURE examples triggered this bug.
  • Loading branch information
nevans committed Sep 29, 2023
1 parent cb52a2d commit 965f9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/imap/response_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def body_type_1part
choice = m&.named_captures&.compact&.keys&.first
# In practice, the following line should never be used. But the ABNF
# *does* allow literals, and this will handle them.
choice ||= lookahead_case_insensitive_string!
choice ||= lookahead_case_insensitive__string!
case choice
when "BASIC" then body_type_basic # => BodyTypeBasic
when "MESSAGE" then body_type_msg # => BodyTypeMessage | BodyTypeBasic
Expand Down

0 comments on commit 965f9a3

Please sign in to comment.