Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YARP] Small fixes for existing ConstantNodes #8346

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion yarp/yarp_compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,14 @@ yp_compile_node(rb_iseq_t *iseq, const yp_node_t *node, LINK_ANCHOR *const ret,
ADD_INSN(ret, &dummy_line_node, putnil);
ADD_INSN1(ret, &dummy_line_node, putobject, Qtrue);
ADD_INSN1(ret, &dummy_line_node, getconstant, ID2SYM(parse_node_symbol((yp_node_t *)constant_read_node)));
if (popped) {
ADD_INSN(ret, &dummy_line_node, pop);
}
return;
}
case YP_NODE_CONSTANT_WRITE_NODE: {
yp_constant_write_node_t *constant_write_node = (yp_constant_write_node_t *) node;
yp_compile_node(iseq, constant_write_node->value, ret, src, popped, compile_context);
yp_compile_node(iseq, constant_write_node->value, ret, src, false, compile_context);

if (!popped) {
ADD_INSN(ret, &dummy_line_node, dup);
Expand Down