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
ArgumentError due to missing ruby2_keywords on Ruby 3.2.0 #1479
Comments
facing the same issue |
Thank you @anero, I was reading through Ruby 3.2 release notes and figured this change might cause some issues. Please feel free to open a PR and address this. Ideally I'd like to fix the It goes without saying we would need a test to demonstrate this as well. I'm surprised none of our tests failed but I guess that's because we never test adding a middleware with keyword arguments |
When adding a middleware that receives keyword arguments in the constructor, the call from `DependencyLoader#new` fails because the method is not defined using `ruby2_keywords`. This adds the required `ruby2_keywords` declaration to `DependencyLoader#new`, fixing the tests and getting Faraday v1.x working with Ruby 3.2.0. Fixes lostisland#1479.
* Run tests against Ruby 3.2 * Declare `DependencyLoader#new` with `ruby2_keywords` to fix Ruby 3.2.0 When adding a middleware that receives keyword arguments in the constructor, the call from `DependencyLoader#new` fails because the method is not defined using `ruby2_keywords`. This adds the required `ruby2_keywords` declaration to `DependencyLoader#new`, fixing the tests and getting Faraday v1.x working with Ruby 3.2.0. Fixes #1479. Co-authored-by: Matt <iMacTia@users.noreply.github.com>
Fixed in #1483. |
And released! Closing this issue. |
* Run tests against Ruby 3.2 * Declare `DependencyLoader#new` with `ruby2_keywords` to fix Ruby 3.2.0 When adding a middleware that receives keyword arguments in the constructor, the call from `DependencyLoader#new` fails because the method is not defined using `ruby2_keywords`. This adds the required `ruby2_keywords` declaration to `DependencyLoader#new`, fixing the tests and getting Faraday v1.x working with Ruby 3.2.0. Fixes lostisland#1479. Co-authored-by: Matt <iMacTia@users.noreply.github.com>
Basic Info
Issue description
When adding a middleware that receives keyword arguments in the constructor, the call from
DependencyLoader#new
fails because the method is not defined usingruby2_keywords
. I noticed that this was first added in #1153 but then got removed in #1211, mentioning that ruby 2.7 did't display any warnings when removingruby2_keywords
.I think that with the change on Ruby 3.2.0 (related to bugs https://bugs.ruby-lang.org/issues/18625 and https://bugs.ruby-lang.org/issues/16466) this no longer works. This is also demonstrated by running the
spec/faraday/rack_builder_spec.rb
specs when targeting Ruby 3.2.0.I can submit a small PR with this change targeting the
1.x
branch if that works for you.Steps to reproduce
Run
spec/faraday/rack_builder_spec.rb
specs on Ruby 3.2.0.The text was updated successfully, but these errors were encountered: