summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regexec.c2
-rw-r--r--t/op/re_tests1
2 files changed, 2 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 4f403a0443..5a7ed12f65 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2805,7 +2805,7 @@ S_regmatch(pTHX_ regnode *prog)
CALLRUNOPS(aTHX); /* Scalar context. */
SPAGAIN;
if (SP == before)
- ret = Nullsv; /* protect against empty (?{}) blocks. */
+ ret = &PL_sv_undef; /* protect against empty (?{}) blocks. */
else {
ret = POPs;
PUTBACK;
diff --git a/t/op/re_tests b/t/op/re_tests
index 7ced95cd6b..9c5ddc4f2f 100644
--- a/t/op/re_tests
+++ b/t/op/re_tests
@@ -921,3 +921,4 @@ ab(?i)cd abCd y - -
(.*?)(?<=[bc]) abcd y $1 ab
(.*?)(?<=[bc])c abcd y $1 ab
2(]*)?$\1 2 y $& 2
+(??{}) x y - -