Fixed codegen error of redo in rescue; fix #3422

The issue (and the fix) was reported by https://hackerone.com/dgaletic
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-02-13 19:31:06 +09:00
parent c2ddcd4517
commit ecb6ac8b4a
+1 -1
View File
@@ -2038,7 +2038,7 @@ codegen(codegen_scope *s, node *tree, int val)
break;
case NODE_REDO:
if (!s->loop) {
if (!s->loop || s->loop->type == LOOP_BEGIN || s->loop->type == LOOP_RESCUE) {
raise_error(s, "unexpected redo");
}
else {