/[A-Z]/ai should match KELVIN SIGN, as it folds to a 'k'. It should not
match under /aai, as that restricts fold matching. But I tested for the
wrong symbol which ended up forbidding both /ai and /aai.
This commit changes to the correct symbol. I also reordered the 'if'
while I was at it as a nano optimisation, to test for the /aa last, as
that is the less common part of the '&&' test.
op = POSIXA;
}
}
- else if (AT_LEAST_ASCII_RESTRICTED || ! FOLD) {
+ else if (! FOLD || ASCII_FOLD_RESTRICTED) {
/* We can optimize A-Z or a-z, but not if they could match
- * something like the KELVIN SIGN under /i (/a means they
- * can't) */
+ * something like the KELVIN SIGN under /i. */
if (prevvalue == 'A') {
if (value == 'Z'
#ifdef EBCDIC
# pat string y/n/etc expr expected-expr skip-reason comment
/[a-z]/i \N{KELVIN SIGN} y $& \N{KELVIN SIGN}
+/[A-Z]/ia \N{KELVIN SIGN} y $& \N{KELVIN SIGN}
+/[A-Z]/iaa \N{KELVIN SIGN} n - -
/[A-Z]/i \N{LATIN SMALL LETTER LONG S} y $& \N{LATIN SMALL LETTER LONG S}
# RT #123840: these used to hang in re_intuit_start