Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong number of arguments given for CampaignMembership#to_process for Ruby 3.2.2 #213

Open
rathboma opened this issue Sep 28, 2023 · 3 comments

Comments

@rathboma
Copy link
Contributor

rathboma commented Sep 28, 2023

Hi folks,

I just attempted an upgrade to Ruby to 3.2.2, and started getting the following error when starting the Heya scheduler:

app/models/heya/campaign_membership.rb:52 wrong number of arguments (given 1, expected 0)

This is the to_process scope, it is called from this line: https://github.com/honeybadger-io/heya/blob/v0.8.0/lib/heya/campaigns/queries.rb#L9

I don't know enough about Ruby 3.2 to understand why this is occuring, but hoping someone here knows?

Replication

  1. Install Ruby 3.2.2
  2. Install Heya
  3. Open a shell and call Heya::CampaignMembership.to_process(user: nil)
@joshuap
Copy link
Member

joshuap commented Oct 6, 2023

@rathboma I can't replicate this error. This is what I get:

Heya::CampaignMembership.to_process(user: nil)
# => []

Heya::Campaigns::Queries::MembershipsToProcess.call(user: nil)
# => []

Is it possible that #to_process is being overridden by something global?

@rathboma
Copy link
Contributor Author

rathboma commented Oct 6, 2023

It's possible. I'll see if I can replicate with a clean project.

@jadetr
Copy link

jadetr commented Dec 4, 2024

In case someone else has this problem. I think the explanation is here: rails/rails#46934
Rails 6.1.x
ruby 3.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants