update Reject#kill_with_options? for Ruby 3 kwargs#868
Merged
mhenrixon merged 2 commits intomhenrixon:mainfrom Mar 1, 2025
Merged
update Reject#kill_with_options? for Ruby 3 kwargs#868mhenrixon merged 2 commits intomhenrixon:mainfrom
mhenrixon merged 2 commits intomhenrixon:mainfrom
Conversation
mhenrixon
reviewed
Feb 28, 2025
7f2d900 to
59960e6
Compare
mhenrixon
approved these changes
Mar 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sometime in the past either the definition of
arityorSidekiq::Deadset#killwas changed. Currently https://apidock.com/ruby/Method/arity returns negative numbers when there are optional arguments, which this method does not consider. The current (and what's been the state for many years now) version of this method takes an optional hash /optsargument": https://github.com/sidekiq/sidekiq/blob/main/lib/sidekiq/api.rb#L900, so the current method is just always returningfalse.My suspicion is that this changed around Ruby3 with the kwarg changes, but I'm not sure.
This updates the method to return
trueif it takes more than one required argument, whether there are optional args or not.