From: Adrian M. Enache Date: Sun, 2 Mar 2003 10:11:27 +0000 (+0200) Subject: Re: [perl #21411] [fix] Postponed RE with split() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91e09a610c67b89c771cab2084dbd4490cd4351a;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #21411] [fix] Postponed RE with split() Message-ID: <20030302081127.GA10782@ratsnest.hole> p4raw-id: //depot/perl@18805 --- diff --git a/pp.c b/pp.c index 1b83259..0a15c74 100644 --- a/pp.c +++ b/pp.c @@ -4695,6 +4695,7 @@ PP(pp_split) } } s = rx->endp[0] + orig; + PUTBACK; } } diff --git a/t/op/pat.t b/t/op/pat.t index b3f42a8..fdc4f9b 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..993\n"; +print "1..994\n"; BEGIN { chdir 't' if -d 't'; @@ -3139,5 +3139,11 @@ ok("bbbbac" =~ /$pattern/ && $1 eq 'a', "[perl #3547]"); ok("\x{2019}" =~ /\S/, "Markus Kuhn 2003-02-26"); } -# last test 993 +{ + my $i; + ok('-1-3-5-' eq join('', split /((??{$i++}))/, '-1-3-5-'), + "[perl #21411] (??{ .. }) corrupts split's stack") +} + +# last test 994