From bd04eb58525c1ea8f06c098c1db71ce68d4f0eea Mon Sep 17 00:00:00 2001 From: nick evans Date: Wed, 21 Dec 2022 17:58:36 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Update=20StringPrep=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/net/imap/sasl/stringprep.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/net/imap/sasl/stringprep.rb b/lib/net/imap/sasl/stringprep.rb index 32d25557..b352b368 100644 --- a/lib/net/imap/sasl/stringprep.rb +++ b/lib/net/imap/sasl/stringprep.rb @@ -26,6 +26,9 @@ def self.[](table) # # Also checks bidirectional characters, when bidi: true, which may # raise a BidiStringError. + # + # +profile+ is an optional string which will be added to any exception that + # is raised (it does not affect behavior). def check_prohibited!(string, *tables, bidi: false, profile: nil) tables = TABLE_TITLES.keys.grep(/^C/) if tables.empty? tables |= %w[C.8] if bidi @@ -47,10 +50,11 @@ def check_prohibited!(string, *tables, bidi: false, profile: nil) # RandALCat character MUST be the last character of the string. # # This is usually combined with #check_prohibited!, so table "C.8" is only - # checked when +c_8: true+. + # checked when c_8: true. # # Raises either ProhibitedCodepoint or BidiStringError unless all - # requirements are met. + # requirements are met. +profile+ is an optional string which will be + # added to any exception that is raised (it does not affect behavior). def check_bidi!(string, c_8: false, profile: nil) check_prohibited!(string, "C.8", profile: profile) if c_8 if BIDI_FAILS_REQ2.match?(string)