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
Puma 5.0.3 deprecation warning in Ruby 2.7 - warning: deprecated Object#=~ is called on Proc #2455
Comments
Thanks for the heads up. The suggested course of action sounds good. |
Thanks and interesting. We've also got the following, which is what I based the breaking code line on (I think): Lines 20 to 26 in d0f75b4
We'll add the warning change to the CI, as I've also seen some running locally... |
Something is odd. I don't know if I've ever really gone thru the configuration code, but One problem with warnings is some are thrown by Ruby classes themselves in older Ruby versions. We still should be able to check them in the integration tests. |
Using 5.0.3, I've started Puma via bin/puma and bin/rackup, and |
@MSP-Greg Really sorry for the missing details - I should have mentioned that puma does start correctly during development (and presumably production), but I run into this warning while running my RSpec test suite, which uses Capybara to start the puma server. I'm not familiar with how capybara is calling puma, but it could be skipping this UPDATE: Yeah maybe the problem is actually in here, where capybara is setting up the puma server: https://github.com/teamcapybara/capybara/blob/d6a3e18f5c605236ae41ec90e872ae6a554c12fc/lib/capybara/registrations/servers.rb#L13-L44 |
Yep, I put a breakpoint in there, and Here's the PR: teamcapybara/capybara#2413 |
I just pushed a new branch to update to puma 5.0.3, and I've configured my CI builds to crash on any warnings. I'm now seeing this warning in the logs:
(This is not happening with puma 5.0.2.)
Here is the line: https://github.com/puma/puma/blob/master/lib/puma/server.rb#L94
It looks like it changed 27 days ago in #2389 - this commit: bbce3d6
I found out that
:environment
is actually being set to aProc
here, inpuma_default_options
:puma/lib/puma/configuration.rb
Line 196 in d0f75b4
It looks like this case is not being hit in the test suite since I couldn't find "Object#=~" in any of the log output here: https://github.com/puma/puma/runs/1308878188?check_suite_focus=true
It might be a good idea to add a new test case that exercises this code path, and then fail the tests if there are any warnings:
The text was updated successfully, but these errors were encountered: