summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarp/yarp_compiler.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/yarp/yarp_compiler.c b/yarp/yarp_compiler.c
index 51c769d30d..b6f453c906 100644
--- a/yarp/yarp_compiler.c
+++ b/yarp/yarp_compiler.c
@@ -541,10 +541,15 @@ yp_compile_node(rb_iseq_t *iseq, const yp_node_t *node, LINK_ANCHOR *const ret,
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
- YP_COMPILE(alias_node->new_name);
- YP_COMPILE(alias_node->old_name);
+ YP_COMPILE_NOT_POPPED(alias_node->new_name);
+ YP_COMPILE_NOT_POPPED(alias_node->old_name);
ADD_SEND(ret, &dummy_line_node, id_core_set_method_alias, INT2FIX(3));
+
+ if (popped) {
+ ADD_INSN(ret, &dummy_line_node, pop);
+ }
+
return;
}
case YP_AND_NODE: {