[ruby-cvs:78381] 191ce5344e (master): Reduce duplicated warnings for the change of Ruby 3 keyword arguments
"Yusuke Endoh" <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.cvs |
|---|---|
| Message-ID | <[email protected]> |
Yusuke Endoh 2019-09-13 17:02:08 +0900 (Fri, 13 Sep 2019)
New Revision: 191ce5344e
https://github.com/ruby/ruby/commit/191ce5344e
Log:
Reduce duplicated warnings for the change of Ruby 3 keyword arguments
By this change, the following code prints only one warning.
```
def foo(**opt); end
100.times { foo({kw:1}) }
```
A global variable `st_table *caller_to_callees` is a map from caller to
a set of callee methods. It remembers that a warning is already printed
for each pair of caller and callee.
[Feature #16289]
Modified files:
test/ruby/test_keyword.rb
test/ruby/test_struct.rb
vm_args.c
vm_insnhelper.c