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

Support Ruby 3.0 #15

Merged

Conversation

MadelineCollier
Copy link

@MadelineCollier MadelineCollier commented Sep 21, 2023

The method signatures that were perviously in place here were generating
ArgumentErrors.

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Co-authored-by: benjamin wil benjamin@super.gd

The method signatures that were perviously in place here were generating
ArgumentErrors.

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-
and-keyword-arguments-in-ruby-3-0/

Co-authored-by: benjamin wil <benjamin@super.gd>
@MadelineCollier MadelineCollier merged commit 8143112 into master Sep 21, 2023
spaghetticode added a commit that referenced this pull request Jun 13, 2024
The old version is compatible with Ruby 3.x, while the new one was
not equivalent to the old one as it requires the second param, which
is irrelevant in the context of the method, to be present.

The new signature poses an issues at least on Rowan, as it prevents
payments to be cancelled:

  Spree::Order.find_by(number: 'KR700391505').payments.first.cancel!
  D, [2024-06-13T08:17:47.239828 #2] DEBUG -- :   TRANSACTION (1.1ms)  ROLLBACK
  /app/vendor/bundle/ruby/3.0.0/bundler/gems/solidus-adyen-f654fd0d419c/app/models/concerns/spree/payment_method/adyen_payment_method.rb:41:in `cancel': wrong number of arguments (given 1, expected 2) (ArgumentError)

The signature change happened in #15.
spaghetticode added a commit that referenced this pull request Jun 13, 2024
The method signature was originally changed in #15 that made the
extension compatible with Ruby 3.x.

The previous version is compatible with Ruby 3.x, while the new one
was not equivalent to the old one as it requires the second param,
which is irrelevant in the context of the method, to be present.

The new signature poses an issues at least on Rowan, as it prevents
payments to be cancelled:

    Spree::Order.find_by(number: 'KR700391505').payments.first.cancel!
    D, [2024-06-13T08:17:47.239828 #2] DEBUG -- :   TRANSACTION (1.1ms)  ROLLBACK
    /app/vendor/bundle/ruby/3.0.0/bundler/gems/solidus-adyen-f654fd0d419c/app/models/concerns/spree/payment_method/adyen_payment_method.rb:41:in `cancel': wrong number of arguments (given 1, expected 2) (ArgumentError)
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

Successfully merging this pull request may close these issues.

2 participants