summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-12-11 15:33:52 +0000
committerJemma Issroff <jemmaissroff@gmail.com>2023-12-13 09:33:07 -0500
commitcb8a9851ca4e78795900cde2fb1147ec3a1192d7 (patch)
tree2a5be88ed9d1097332cc80db0773033d847cac5e
parent9267dbdd7ad1f41116a89c2ce044b776274afc44 (diff)
[PRISM] Remove errant NOP when redo_label is set
-rw-r--r--prism_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/prism_compile.c b/prism_compile.c
index 3a9fb392a1..97bb9b0e88 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -4965,7 +4965,9 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
ADD_TRACE(ret, RUBY_EVENT_B_CALL);
NODE dummy_line_node = generate_dummy_line_node(body->location.first_lineno, -1);
- PM_NOP;
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0) {
+ PM_NOP;
+ }
ADD_LABEL(ret, start);
if (scope_node->body) {