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
Refactor const.rb - freeze #3016
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of '
comes from HTTP_STATUS_CODES
and PUMA_SERVER_STRING
, otherwise this file uses "
, address that if you want or save it for later (in general I dislike doing changes like this because it makes git blame
harder to use but if we are touching them anyways...)
For you, I changed all Personally, I prefer EDIT: yeah, |
@dentarg Thaks for the review. I've looked at it before, but (of course) now that 6.0.0 is released, I'm really looking at it. There are a lot of constants that could be moved, as they're only used in one file. For instance, the comment for Any thoughts? |
No real thoughts on that other than it sounds like a different PR :) |
Of course... |
Thoughts? Just checking, as this does remove some constants added to 6.0.0. See updated first post. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good idea, I was wondering why all these freezes were still in place! 🙂
Slipped through in puma#3016
Description
Ruby 2.3 implemented the magic comment
# frozen_string_literal: true
. The below shows one interesting result,join
:So, remove
.freeze
when not needed in const.rb. Also, remove extra constants (GET POST PUT DELETE OPTIONS TRACE PATCH
) that were added in 1b6b8adfaeb4.Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.