Ensure Array
has been decorated with #extract_options
#1185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(sorry for the missing description -- the github code editor doesn't make the PR generation flow entirely obvious)
My team maintains a sinatra-based application that uses delayed_job (http://github.com/cloudfoundry/bosh). Only the
activesupport
gem is present as a dependency. We recently upgradedactivesupport
to latest in response to the recent Rails CVE. After this change our integration tests began failing.What we have observed is in versions of activesupport > 6.0.x, the
#extract_options!
method is not "automatically" applied to Arrays. It is not clear to me when how this behavior change has been introduced, but I don't think it is too important, as I expect it is likely desired behavior from the Rails team (e.g, I see this behavior being explicitly loaded elsewhere in the Rails codebase) and probably best fixed by explicitly requiring this library. I notice there is a similar pattern in the delayed_job codebase (e.g.lib/delayed/worker.rb
) for pulling in active_support dependencies.I suspect this is not an issue in your tests because it appears the entire Rails dependency stack is pulled in. I believe parts of Rails are likely to automatically load this file at some point which may explain why tests aren't failing and there are no other complaints from other users.
For now we will likely workaround by explicitly loading this active_support file whenever we require delayed_job but it would be great if we could get this change integrated into delayed_job itself so we could remove this extra require call.
Thank you!