summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-07-30 12:33:31 -0600
committerFlorian Ragwitz <rafl@debian.org>2011-09-15 14:35:47 +0200
commit46d8d46311a56eed7bf78c898786a12fc1e49d55 (patch)
treeb31cecccadb4c8c6d0b7769fc16cf2e77cd47302
parent3feb3f49884efa2c4078dbbd3a4b68af4174b641 (diff)
downloadperl-46d8d46311a56eed7bf78c898786a12fc1e49d55.tar.gz
/aa and \b fail under some utf8 strings
This was due to my failure to realize that this 'if' needed to be updated when the /aa modifier was added.
-rw-r--r--regexec.c5
-rw-r--r--t/re/charset.t2
2 files changed, 4 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 55bc045caa..0dc093f831 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3663,7 +3663,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
case NBOUNDU:
case NBOUNDA:
/* was last char in word? */
- if (utf8_target && FLAGS(scan) != REGEX_ASCII_RESTRICTED_CHARSET) {
+ if (utf8_target
+ && FLAGS(scan) != REGEX_ASCII_RESTRICTED_CHARSET
+ && FLAGS(scan) != REGEX_ASCII_MORE_RESTRICTED_CHARSET)
+ {
if (locinput == PL_bostr)
ln = '\n';
else {
diff --git a/t/re/charset.t b/t/re/charset.t
index e922686421..8d981258a2 100644
--- a/t/re/charset.t
+++ b/t/re/charset.t
@@ -80,8 +80,6 @@ foreach my $charset (@charsets) {
my $match = 1; # Calculated whether test regex should
# match or not
- local $::TODO = "/aa doesn't always work with utf8" if $upgrade && $charset eq "aa";
-
# Everything always matches in ASCII, or under /u
if ($ord < 128 || $charset eq 'u') {
$reason = "\"$char\" is a $class under /$charset";