Problem
The public Net::IMAP::ResponseParser#parse path can receive a UTF-8-tagged String containing valid IMAP literal or quoted response bytes and raise Encoding::CompatibilityError. The same bytes parse when tagged binary. Socket input is normally binary, but the public parser should treat protocol input bytewise.
Prepared atomic commit c965ef5545b918b2515879ef817d4bd93d6d2b52 normalizes parser input to a binary view without mutating the caller. Current suites pass on Ruby 4.0.6 and 3.2.11; external models cover literal/quoted STATUS, ID data, frozen strings and ownership. No repository tests were modified.
Problem
The public
Net::IMAP::ResponseParser#parsepath can receive a UTF-8-tagged String containing valid IMAP literal or quoted response bytes and raiseEncoding::CompatibilityError. The same bytes parse when tagged binary. Socket input is normally binary, but the public parser should treat protocol input bytewise.Prepared atomic commit
c965ef5545b918b2515879ef817d4bd93d6d2b52normalizes parser input to a binary view without mutating the caller. Current suites pass on Ruby 4.0.6 and 3.2.11; external models cover literal/quoted STATUS, ID data, frozen strings and ownership. No repository tests were modified.