diff options
-rw-r--r-- | pp.c | 3 | ||||
-rw-r--r-- | t/op/repeat.t | 84 |
2 files changed, 85 insertions, 2 deletions
@@ -1694,7 +1694,8 @@ PP(pp_repeat) else { dTOPss; ASSUME(MARK + 1 == SP); - XPUSHs(sv); + MEXTEND(SP, 1); + PUSHs(sv); MARK[1] = &PL_sv_undef; } SP = MARK + 2; diff --git a/t/op/repeat.t b/t/op/repeat.t index 978916689b..fa7ce06904 100644 --- a/t/op/repeat.t +++ b/t/op/repeat.t @@ -6,7 +6,7 @@ BEGIN { set_up_inc( '../lib' ); } -plan(tests => 49); +plan(tests => 50); # compile time @@ -192,3 +192,85 @@ fresh_perl_like( eval q{() = (() or ((0) x 0)); 1}; is($@, "", "RT #130247"); + +# yes, the newlines matter +fresh_perl_is(<<'PERL', "", { stderr => 1 }, "(perl #133778) MARK mishandling"); +map{s[][];eval;0}<DATA>__END__ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +()x0 + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +PERL |