diff options
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | t/op/re_tests | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -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 - - |