ruby-changes:57817
From: Nobuyoshi <ko1@a...>
Date: Fri, 20 Sep 2019 00:20:36 +0900 (JST)
Subject: [ruby-changes:57817] e13b09c450 (master): Use EXPECT_NODE_NONULL
https://git.ruby-lang.org/ruby.git/commit/?id=e13b09c450 From e13b09c450eb4ffc0ffc86d479e5b0c75599ad9c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 19 Sep 2019 23:45:09 +0900 Subject: Use EXPECT_NODE_NONULL diff --git a/compile.c b/compile.c index 58b3b77..7cfda23 100644 --- a/compile.c +++ b/compile.c @@ -5347,8 +5347,7 @@ compile_case2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no https://github.com/ruby/ruby/blob/trunk/compile.c#L5347 vals = node->nd_head; if (!vals) { - COMPILE_ERROR(ERROR_ARGS "NODE_WHEN: must be NODE_LIST, but 0"); - return COMPILE_NG; + EXPECT_NODE_NONULL("NODE_WHEN", node, NODE_LIST, COMPILE_NG); } switch (nd_type(vals)) { case NODE_LIST: -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/