barsoom / attr_extras

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

Warning with Ruby 2.7 #33

Closed gylaz closed 4 years ago

gylaz commented 4 years ago

Seeings the likes of:

...gems/2.7.0/gems/attr_extras-6.2.3/lib/attr_extras/explicit.rb:66: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

Any idea if there's a way around it, or how to fix?

olleolleolle commented 4 years ago

One way would be to use the ruby2_keywords gem, and "annotate" the methods which this can happen to.

Would you like to make a PR?

PS: You can read more about the gem & the issue at: https://eregon.me/blog/2019/11/10/the-delegation-challenge-of-ruby27.html

mcmire commented 4 years ago

34 should fix this!