diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-11-29 19:02:05 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-11-29 19:02:05 +0000 |
commit | dfd167e94af611f6248e804cb228b35ca4123bd6 (patch) | |
tree | 69a15032aa8f927649745d4b8053c03d46edbe27 /t | |
parent | f5fa9033b8c1fdcbd7710850b3b0380d6b937853 (diff) | |
download | perl-dfd167e94af611f6248e804cb228b35ca4123bd6.tar.gz |
Handle $@ being assigned a read-only value (without error or busting the stack).
Discovered whilst investigating RT #70862.
Diffstat (limited to 't')
-rw-r--r-- | t/op/eval.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t index 4daf0b96e1..58a6334b27 100644 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -print "1..101\n"; +print "1..103\n"; eval 'print "ok 1\n";'; @@ -572,3 +572,16 @@ eval { }; print "ok\n"; EOP + +fresh_perl_is(<<'EOP', "ok\n", undef, 'related to RT #70862'); +$::{'@'}=\3; +eval {}; +print "ok\n"; +EOP + +fresh_perl_is(<<'EOP', "ok\n", undef, 'related to RT #70862'); +eval { + $::{'@'}=\3; +}; +print "ok\n"; +EOP |