mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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 ```
This commit is contained in:
parent
4b3e007e07
commit
b609bdeb53
4 changed files with 37 additions and 6 deletions
4
node.h
4
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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue