diff options
author | Jeremy Evans <code@jeremyevans.net> | 2025-05-29 22:32:09 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2025-08-22 00:46:57 +0900 |
commit | acb29f7fa1497463ed3bdd65549ef20b61beda64 (patch) | |
tree | dfca2cfa76083f4d9f10892d966a3962e8724178 /lib/bundled_gems.rb | |
parent | b0c80c2be8377ff02811b508ae79f18ec4a31f0e (diff) |
Previously, ruby2_keywords could be used on a method or proc with
post arguments, but I don't think the behavior is desired:
```ruby
def a(*c, **kw) [c, kw] end
def b(*a, b) a(*a, b) end
ruby2_keywords(:b)
b({foo: 1}, bar: 1)
```
This changes ruby2_keywords to emit a warning and not set the
flag on a method/proc with post arguments.
While here, fix the ruby2_keywords specs for warnings, since they
weren't testing what they should be testing. They all warned
because the method didn't accept a rest argument, not because it
accepted a keyword or keyword rest argument.
Diffstat (limited to 'lib/bundled_gems.rb')
0 files changed, 0 insertions, 0 deletions