lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.76k stars 981 forks source link

Use generic argument forwarding + remove ruby2_keywords #1601

Closed chaymaeBZ closed 5 days ago

chaymaeBZ commented 5 days ago

Description

Use generic argument forwarding (...) and remove ruby2_keywords as it is not needed. This makes it much faster as it does not need to allocate. This is also a step forward complete removal of ruby2_keywords.

Additional Notes

Can't do the same for the adapter method as it throws a syntax error with ruby 3.0.0.

Code/faraday/lib/faraday/rack_builder.rb:109: syntax error, unexpected (...
  ...dapter(klass = NO_ARGUMENT, ...)
 ...                             ^~~