diff options
-rw-r--r-- | pp_ctl.c | 1 | ||||
-rwxr-xr-x | t/op/eval.t | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -3124,6 +3124,7 @@ PP(pp_leaveeval) MEXTEND(mark,0); *MARK = &PL_sv_undef; } + SP = MARK; } else { /* in case LEAVE wipes old return values */ diff --git a/t/op/eval.t b/t/op/eval.t index abcb3794b7..ea6caf43bd 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -1,6 +1,6 @@ #!./perl -print "1..37\n"; +print "1..38\n"; eval 'print "ok 1\n";'; @@ -176,3 +176,9 @@ $SIG{__DIE__} = sub { eval {1}; die shift }; eval { die "ok ".$x++,"\n" }; print $@; +# does scalar eval"" pop stack correctly? +{ + my $c = eval "(1,2)x10"; + print $c eq '2222222222' ? "ok $x\n" : "# $c\nnot ok $x\n"; + $x++; +} |