diff options
author | yves orton <bugs-perl5@bugs6.perl.org> | 2006-11-17 16:07:00 +0000 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2006-11-17 19:54:49 +0000 |
commit | f0852a51af159e1bea17f91d673cfba18804cbb5 (patch) | |
tree | 5473473c5f8eeb1495e16e70d9d6a0861063674f /regexec.c | |
parent | f026e24baa3a7e847539858e94ce5f0945d6d5d8 (diff) | |
download | perl-f0852a51af159e1bea17f91d673cfba18804cbb5.tar.gz |
[perl #36909] $^R undefined on matches involving backreferences
From: yves orton via RT <bugs-perl5@bugs6.perl.org>
Date: Nov 17, 2006 4:07 PM
p4raw-id: //depot/perl@29308
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3867,7 +3867,15 @@ NULL } case CURLYX_end: /* just finished matching all of A*B */ - regcpblow(ST.cp); + if (PL_reg_eval_set){ + SV *pres= GvSV(PL_replgv); + SvREFCNT_inc(pres); + regcpblow(ST.cp); + sv_setsv(GvSV(PL_replgv), pres); + SvREFCNT_dec(pres); + } else { + regcpblow(ST.cp); + } cur_curlyx = ST.prev_curlyx; sayYES; /* NOTREACHED */ |