Created
July 2, 2024 01:03
-
-
Save nrdvana/8abe88169b8dec856babb69b2a1a1e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/toke.c b/toke.c | |
index e6ff0c4f74..3c32e70dfd 100644 | |
--- a/toke.c | |
+++ b/toke.c | |
@@ -9174,6 +9174,13 @@ yyl_try(pTHX_ char *s) | |
return tok; | |
goto retry_bufptr; | |
} | |
+ if (UTF && s + 2 < PL_bufend && *s == '\xE2' && s[1] == '\x88' && s[2] == '\x9E') { | |
+ pl_yylval.opval = newSVOP(OP_CONST, 0, newSVnv(NV_INF)); | |
+ s += 3; | |
+ if (PL_expect == XOPERATOR) | |
+ no_op("Number",s); | |
+ TERM(THING); | |
+ } | |
yyl_croak_unrecognised(aTHX_ s); | |
case 4: | |
diff --git a/t/uni/variables.t b/t/uni/variables.t | |
index 2c18951a1a..9db474b1d9 100644 | |
--- a/t/uni/variables.t | |
+++ b/t/uni/variables.t | |
@@ -296,7 +296,7 @@ for my $i (0x100..0xffff) { | |
} | |
else { | |
like($@, | |
- qr/\QUnrecognized character \x{$esc};/, | |
+ $i == 0x221e? qr/^syntax error/ : qr/\QUnrecognized character \x{$esc};/, | |
"\\x{$esc} isn't XIDS, illegal as a length-1 variable", | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment