From b609bdeb5307e280137b4b2838af0fe4e4b46f1c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 25 Oct 2019 01:16:05 +0900 Subject: Define arguments forwarding as `ruby2_keywords` style Get rid of these redundant and useless warnings. ``` $ ruby -e 'def bar(a) a; end; def foo(...) bar(...) end; foo({})' -e:1: warning: The last argument is used as the keyword parameter -e:1: warning: for `foo' defined here -e:1: warning: The keyword argument is passed as the last hash parameter -e:1: warning: for `bar' defined here ``` --- node.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'node.h') diff --git a/node.h b/node.h index 55c2984ff3..8f43f45422 100644 --- a/node.h +++ b/node.h @@ -453,7 +453,9 @@ struct rb_args_info { NODE *kw_rest_arg; NODE *opt_args; - int no_kwarg; + unsigned int no_kwarg: 1; + unsigned int ruby2_keywords: 1; + VALUE imemo; }; -- cgit v1.2.3