brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

Use ruby_2_keywords to handle keyword arguments #236

Closed jhottenstein closed 3 years ago

jhottenstein commented 3 years ago

Alternate solution for #234

I think #235 is also a great solution and happy for that to be used instead.

Per https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/, this method should offer support back to Ruby 2.0. This was the method used for rspec which requires ruby support back to 1.8

brandonhilkert commented 3 years ago

Merged in https://github.com/brandonhilkert/sucker_punch/pull/235. Thanks for offering an alternative solution.

eregon commented 3 years ago

This is the correct way, nice PR :)

ivoanjo commented 3 years ago

Thanks for the quick fix! :)