summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 23a85f8785..d8411055e0 100644
--- a/compile.c
+++ b/compile.c
@@ -3601,7 +3601,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
(type == NODE_CALL ||
(type == NODE_ATTRASGN && !private_recv_p(node)));
- if (!lfinish[1]) {
+ if (!lfinish[1] && (node->nd_args || explicit_receiver)) {
lfinish[1] = NEW_LABEL(nd_line(node));
}
if (node->nd_args) {