summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-02-19 20:28:19 -0700
committerKarl Williamson <khw@cpan.org>2018-02-19 20:47:10 -0700
commit8638266fb1a6a7f9b6ce2567347bfba94f8b2414 (patch)
tree9afac98dd79a1f83e6d28cf51f5f09d94e779c13
parente54417e05d50aa46e805071583a78db0e3e557e9 (diff)
downloadperl-8638266fb1a6a7f9b6ce2567347bfba94f8b2414.tar.gz
Fix skipping char in (*sr:...) defn
This was wrongly calling nextchar(), which skipped the next character wrongly
-rw-r--r--regcomp.c1
-rw-r--r--t/re/script_run.t3
2 files changed, 3 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 8f55141259..13c4154192 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10899,7 +10899,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
if (RExC_in_script_run) {
paren = ':';
- nextchar(pRExC_state);
ret = NULL;
goto parse_rest;
}
diff --git a/t/re/script_run.t b/t/re/script_run.t
index 6779e2ee1a..5005d637a4 100644
--- a/t/re/script_run.t
+++ b/t/re/script_run.t
@@ -86,4 +86,7 @@ foreach my $type ('script_run', 'sr') {
like("写真だけの結婚式", $script_run, "Mixed Hiragana and Han");
}
+ # Until fixed, this was skipping the '['
+ unlike("abc]c", qr/^ (*sr:a(*sr:[bc]*)c) $/x, "Doesn't skip parts of exact matches");
+
done_testing();