aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-11-06 21:32:02 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-11-07 14:03:57 +0000
commitb7d5a63b9a0f762ef15572c14b40a784a5c27c35 (patch)
tree7c51f63083a3b9e5115ea1e992ba2f09902187ec
parent8ef7f273218ea0bbbdb1d32e34459cfbf342df97 (diff)
downloadruby-b7d5a63b9a0f762ef15572c14b40a784a5c27c35.tar.gz
[PRISM] Don't generate leave insns for Ensure nodes
-rw-r--r--prism_compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/prism_compile.c b/prism_compile.c
index e8be7e6bb7..32d5a07aa0 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -3406,7 +3406,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
free(index_lookup_table);
- if (!scope_node->previous) {
+ if (!PM_NODE_TYPE_P(scope_node->ast_node, PM_ENSURE_NODE)) {
ADD_INSN(ret, &dummy_line_node, leave);
}
return;