-
Notifications
You must be signed in to change notification settings - Fork 254
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
Update to be frozen string literal safe #545
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.
Thanks for the PR! I think it is important to make sshkit frozen-string-literal safe to support future versions of Ruby.
I suggest simplifying some of the changes somewhat. Please see my comments below.
result << COLOR_CODES.fetch(color).to_s | ||
result << ";49m#{string}\e[0m" | ||
|
||
"#{result}#{COLOR_CODES.fetch(color)};49m#{string}\e[0m" |
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.
👍
@@ -30,6 +30,8 @@ jobs: | |||
bundler-cache: true | |||
- name: Run tests | |||
run: bundle exec rake test:units | |||
env: | |||
RUBYOPT: ${{ startsWith(matrix.ruby, 'head') && '--enable=frozen-string-literal' || '' }} |
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.
Nice enhancement!
990a051
to
33b72e0
Compare
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.
Great, thanks for the contribution! 🙇
No description provided.