aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 368a69853d..51b7b9fc3c 100644
--- a/compile.c
+++ b/compile.c
@@ -4599,7 +4599,16 @@ compile_cpath(LINK_ANCHOR *const ret, rb_iseq_t *iseq, const NODE *cpath)
}
}
-#define private_recv_p(node) (nd_type((node)->nd_recv) == NODE_SELF)
+static inline int
+private_recv_p(const NODE *node)
+{
+ if (nd_type(node->nd_recv) == NODE_SELF) {
+ NODE *self = node->nd_recv;
+ return self->nd_state != 0;
+ }
+ return 0;
+}
+
static void
defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
const NODE *const node, LABEL **lfinish, VALUE needstr);