Skip to content

Commit

Permalink
/aa and \b fail under some utf8 strings
Browse files Browse the repository at this point in the history
This was due to my failure to realize that this 'if' needed to
be updated when the /aa modifier was added.
  • Loading branch information
Karl Williamson committed Jul 30, 2011
1 parent c973bd4 commit f2e96b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion regexec.c
Expand Up @@ -3685,7 +3685,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 {
Expand Down
2 changes: 0 additions & 2 deletions t/re/charset.t
Expand Up @@ -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";
Expand Down

0 comments on commit f2e96b5

Please sign in to comment.