From 343b0a281d1dd6e1ab7e6af4c48ad2e6d09a0071 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 11 Sep 2019 16:17:04 +0900 Subject: Made a short-circuit expression w/o result into an `if`-statement --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index f384679a83..8d7fc69892 100644 --- a/parse.y +++ b/parse.y @@ -11672,7 +11672,7 @@ node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, a0 = local_tbl(p, &tbl); n = NEW_NODE(type, a0, a1, a2, loc); - tbl && RB_OBJ_WRITTEN(p->ast, Qnil, tbl); + if (tbl) RB_OBJ_WRITTEN(p->ast, Qnil, tbl); return n; } -- cgit v1.2.3