summaryrefslogtreecommitdiff
path: root/node.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-25 01:16:05 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-25 01:16:05 +0900
commitb609bdeb5307e280137b4b2838af0fe4e4b46f1c (patch)
tree65434e9c844163b6f300b5eb256731e9bb0d2b67 /node.h
parent4b3e007e0778415e75ec2f0afcdc559eea43fdf8 (diff)
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 ```
Diffstat (limited to 'node.h')
-rw-r--r--node.h4
1 files changed, 3 insertions, 1 deletions
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;
};