diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-25 01:16:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-25 01:16:05 +0900 |
commit | b609bdeb5307e280137b4b2838af0fe4e4b46f1c (patch) | |
tree | 65434e9c844163b6f300b5eb256731e9bb0d2b67 /node.h | |
parent | 4b3e007e0778415e75ec2f0afcdc559eea43fdf8 (diff) | |
download | ruby-b609bdeb5307e280137b4b2838af0fe4e4b46f1c.tar.gz |
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; }; |