barsoom / attr_extras

Takes some boilerplate out of Ruby with methods like attr_initialize.
MIT License
560 stars 31 forks source link

Pass kwargs explicitly in explicit static_facade #34

Closed mcmire closed 4 years ago

mcmire commented 4 years ago

Beginning with Ruby 2.7.0, Ruby is a bit more strict about argument splatting and spreading. Specifically, there is even more of a difference between keyword arguments and positional arguments than there was before, and when Ruby 3 is released, *args will no longer capture keyword arguments — you must use **kwargs. (See this post.) So when we are causing .static_facade to delegate most of its arguments to .new, we must use a double-splat, otherwise we will get a warning.

Fixes #33

mcmire commented 4 years ago

@olleolleolle I updated the spec helper with your suggestion if you want to take another look!