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

faraday-1.4.2/lib/faraday/connection.rb:423: warning: instance variable @manual_proxy not initialized #1285

Closed
gurgeous opened this issue May 25, 2021 · 0 comments · Fixed by #1286

Comments

@gurgeous
Copy link
Contributor

Basic Info

  • Faraday Version: 1.4.2
  • Ruby Version: 2.7.2

Issue description

My console is filling up with a new warning when I run tests:

faraday-1.4.2/lib/faraday/connection.rb:423: warning: instance variable @manual_proxy not initialized
faraday-1.4.2/lib/faraday/connection.rb:423: warning: instance variable @manual_proxy not initialized
faraday-1.4.2/lib/faraday/connection.rb:423: warning: instance variable @manual_proxy not initialized
...

This warning will be shown to anyone running with Ruby warnings enabled, which is the default for Rake::TestTask.

It's caused by @manual_proxy being accessed in url_prefix= before calling initialize_proxy in the constructor. A simple fix would be to set @manual_proxy = nil up top in the constructor.

Steps to reproduce

$ irb -w
>> require 'faraday' ; Faraday.default_connection
faraday-1.4.2/lib/faraday/connection.rb:423: warning: instance variable @manual_proxy not initialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants