This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Skip padrange optimisation for one padop
[perl5.git] / regcomp.c
index 1757d23..ebda789 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14420,8 +14420,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
              * included.  literal_endpoint==2 means both ends of the range used
              * a literal character, not \x{foo} */
            if (literal_endpoint == 2
-                && ((prevvalue >= 'a' && value <= 'z')
-                    || (prevvalue >= 'A' && value <= 'Z')))
+                && ((isLOWER_A(prevvalue) && isLOWER_A(value))
+                    || (isUPPER_A(prevvalue) && isUPPER_A(value))))
             {
                 _invlist_intersection(this_range, PL_XPosix_ptrs[_CC_ASCII],
                                       &this_range);