diff options
-rw-r--r-- | prism_compile.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3994,9 +3994,11 @@ pm_compile_defined_expr0(rb_iseq_t *iseq, const pm_node_t *node, const pm_node_l return; } case PM_CALL_NODE: { const pm_call_node_t *cast = ((const pm_call_node_t *) node); - if (cast->block != NULL && PM_NODE_TYPE_P(cast->block, PM_BLOCK_NODE)) { dtype = DEFINED_EXPR; break; } @@ -4016,7 +4018,7 @@ pm_compile_defined_expr0(rb_iseq_t *iseq, const pm_node_t *node, const pm_node_l if (cast->receiver) { pm_compile_defined_expr0(iseq, cast->receiver, node_location, ret, popped, scope_node, true, lfinish, true); - if (PM_NODE_TYPE_P(cast->receiver, PM_CALL_NODE)) { PUSH_INSNL(ret, location, branchunless, lfinish[2]); const pm_call_node_t *receiver = (const pm_call_node_t *) cast->receiver; @@ -4038,6 +4040,8 @@ pm_compile_defined_expr0(rb_iseq_t *iseq, const pm_node_t *node, const pm_node_l } return; } case PM_YIELD_NODE: PUSH_INSN(ret, location, putnil); |