diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-05 10:36:28 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-05 17:47:12 -0700 |
commit | d1ef73b59cede58f2173fa0f4ff7480a820f25d6 (patch) | |
tree | 39e3f12eb37469d60d4f027da3f0aa6f68936bf5 /vm_args.c | |
parent | 55b96c5d2d7d8bcc2953484bd2f9c9519b252dae (diff) |
Always remove empty keyword hashes when calling methods
While doing so is not backwards compatible with Ruby 2.6, it is
necessary for generic argument forwarding to work for all methods:
```ruby
def foo(*args, **kw, &block)
bar(*args, **kw, &block)
end
```
If you do not remove empty keyword hashes, and bar does not accept
keyword arguments, then a call to foo without keyword arguments
calls bar with an extra positional empty hash argument.
Diffstat (limited to 'vm_args.c')
0 files changed, 0 insertions, 0 deletions