don't longjmp() in pp_goto() (regressive bug from old single-stack
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 13 Oct 1998 01:49:16 +0000 (01:49 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 13 Oct 1998 01:49:16 +0000 (01:49 +0000)
implementation)

p4raw-id: //depot/perl@1941

pp_ctl.c
t/op/runlevel.t

index 8d43291..b566738 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2204,11 +2204,6 @@ PP(pp_goto)
        PL_do_undump = FALSE;
     }
 
-    if (PL_top_env->je_prev) {
-        PL_restartop = retop;
-        JMPENV_JUMP(3);
-    }
-
     RETURNOP(retop);
 }
 
index 307e2a0..bff3c36 100755 (executable)
@@ -315,3 +315,23 @@ main|-|9|main::__ANON__
 In DIE
 main|-|10|(eval)
 main|-|10|main::foo
+########
+package TEST;
+sub TIEARRAY {
+  return bless [qw(foo fee fie foe)], $_[0];
+}
+sub FETCH {
+  my ($s,$i) = @_;
+  if ($i) {
+    goto bbb;
+  }
+bbb:
+  return $s->[$i];
+}
+package main;
+tie my @bar, 'TEST';
+print join('|', @bar[0..3]), "\n"; 
+EXPECT
+foo|fee|fie|foe