Shopify / rbi-central

MIT License
55 stars 36 forks source link

Bring `ActiveJob#discard_on` RBI in-line with `rescue_on` and `retry_on` methods #263

Closed larouxn closed 1 month ago

larouxn commented 2 months ago

Type of Change

Changes

I'm trying to bring discard_on in-line with rescue_on and retry_on considering according to the Rails documentation they're all the same.

Additionally, would seemingly allow discard_on usage to avoid needing T.unsafe with the latest Sorbet provided the array of strings is frozen via freeze re: the following change.

larouxn commented 1 month ago

🎩 Just updated local ActiveJob RBI annotations file manually and indeed this appears to fix the discrepancy behavior between splatting discard_on and rescue_on + retry_on when using a frozen array of strings. Before discard_on needed T.unsafe and with this change it appears it no longer does. 🙌

egiurleo commented 1 month ago

Thanks @larouxn!