Fix up compiling popped ranges with non-optimizable bounds
Fixes [Bug #20763]
This commit is contained in:
parent
7e19904c88
commit
addb5fea94
Notes:
git
2024-09-27 17:43:57 +00:00
@ -9678,19 +9678,19 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (cast->left == NULL) {
|
if (cast->left != NULL) {
|
||||||
PUSH_INSN(ret, location, putnil);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PM_COMPILE(cast->left);
|
PM_COMPILE(cast->left);
|
||||||
}
|
}
|
||||||
|
else if (!popped) {
|
||||||
if (cast->right == NULL) {
|
|
||||||
PUSH_INSN(ret, location, putnil);
|
PUSH_INSN(ret, location, putnil);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
if (cast->right != NULL) {
|
||||||
PM_COMPILE(cast->right);
|
PM_COMPILE(cast->right);
|
||||||
}
|
}
|
||||||
|
else if (!popped) {
|
||||||
|
PUSH_INSN(ret, location, putnil);
|
||||||
|
}
|
||||||
|
|
||||||
if (!popped) {
|
if (!popped) {
|
||||||
PUSH_INSN1(ret, location, newrange, INT2FIX(exclude_end ? 1 : 0));
|
PUSH_INSN1(ret, location, newrange, INT2FIX(exclude_end ? 1 : 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user