ruby-changes:57717
From: Nobuyoshi <ko1@a...>
Date: Wed, 11 Sep 2019 16:28:27 +0900 (JST)
Subject: [ruby-changes:57717] 343b0a281d (master): Made a short-circuit expression w/o result into an `if`-statement
https://git.ruby-lang.org/ruby.git/commit/?id=343b0a281d From 343b0a281d1dd6e1ab7e6af4c48ad2e6d09a0071 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 11 Sep 2019 16:17:04 +0900 Subject: Made a short-circuit expression w/o result into an `if`-statement diff --git a/parse.y b/parse.y index f384679..8d7fc69 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, https://github.com/ruby/ruby/blob/trunk/parse.y#L11672 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/