Ruby 3 support
valerauko opened this issue · comments
Ruby 3 changed the way it handles keyword arguments, and is a roadblock with delayed_job. I checked the relevant bits in the source of this gem (at least the bits that used to be relevant in delayed_job) and didn't see any changes or fixes for Ruby 3 keyword argument handling.
delayed/lib/delayed/message_sending.rb
Lines 11 to 13 in 2d296b9
delayed/lib/delayed/performable_method.rb
Lines 25 to 27 in 2d296b9
While the gemspec suggests Ruby 3 should work, does it really?
Great callout! Thank you!
Our focus for this gem has been to shift it towards using ActiveJob as the primary end-developer API, and ActiveJob performables already fully support Ruby 3.0 kwargs.
That said, we have not removed or reworked the existing Delayed::MessageSending
APIs. Therefore, we should consider these APIs fully supported (at least, as long as we don't officially say they aren't), and so it would only make sense to fix these Ruby 3 compatibility issues. I put together a proposed code change (#7) to address this.
Longer term, we may choose to extract all of the Delayed::MessageSending
behaviors into an optional gem, or remove them entirely in favor of something else (to be determined - maybe an ActiveJob-based equivalent of .delay
). For now, though, hopefully these Ruby 3.0 fixes will tide us over!
Oh if the ActiveJob (perform_later?) API works with Ruby 3 this issue is moot. .delay
is a pretty dangerous construct so if you say it's not supported I don't think that's an issue.