summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prism_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/prism_compile.c b/prism_compile.c
index 53875f6a99..68ce705f70 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -4153,6 +4153,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
pm_compile_call(iseq, call_node, ret, popped, scope_node, method_id, start);
}
else if ((method_id == idUMinus || method_id == idFreeze) &&
+ !PM_NODE_FLAG_P(call_node, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION) &&
PM_NODE_TYPE_P(call_node->receiver, PM_STRING_NODE) &&
call_node->arguments == NULL &&
call_node->block == NULL &&