summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2007-07-16 13:15:37 +0000
committerDave Mitchell <davem@fdisolutions.com>2007-07-16 13:15:37 +0000
commit503de4705ff6537018ae94e9179e16636748b2a6 (patch)
treed022d6d730a079eac8721ce355c9ae08c781a689 /t
parent4629c4f60ec83d0f102cd8ac641c8eefa2bb4a6f (diff)
downloadperl-503de4705ff6537018ae94e9179e16636748b2a6.tar.gz
[perl #43425] local $[: fix scoping during parser error handling.
Change 22306# inadvertently made 'local $[' statement-scoped rather than block-scoped; so revert that change and add a different fix. The problem was to ensure that the savestack got popped correctly while popping errored tokens. We how record the current value of PL_savestack_ix with each pushed parser state. p4raw-id: //depot/perl@31615
Diffstat (limited to 't')
-rwxr-xr-xt/op/local.t7
1 files changed, 2 insertions, 5 deletions
diff --git a/t/op/local.t b/t/op/local.t
index 0fe1b2e049..ee250e111d 100755
--- a/t/op/local.t
+++ b/t/op/local.t
@@ -331,13 +331,10 @@ like($@, qr/Modification of a read-only value attempted/);
eval { for("a") { for $x (1,2) { local $_="b"; s/(.*)/+$1/ } } };
is($@, "");
-# Special local() behavior for $[
-# (see RT #43425, which contains a potential fix)
+# RT #4342 Special local() behavior for $[
{
local $[ = 1;
- local $TODO = "local() not currently working correctly with \$[";
- ok(1 == $[);
- undef $TODO;
+ ok(1 == $[, 'lexcical scope of local $[');
f();
}