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

Update to be frozen string literal safe #545

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

npezza93
Copy link
Contributor

No description provided.

Copy link
Member

@mattbrictson mattbrictson left a 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.

lib/sshkit/deprecation_logger.rb Outdated Show resolved Hide resolved
lib/sshkit/deprecation_logger.rb Outdated Show resolved Hide resolved
result << COLOR_CODES.fetch(color).to_s
result << ";49m#{string}\e[0m"

"#{result}#{COLOR_CODES.fetch(color)};49m#{string}\e[0m"
Copy link
Member

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' || '' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice enhancement!

test/unit/backends/test_abstract.rb Outdated Show resolved Hide resolved
@npezza93 npezza93 force-pushed the master branch 4 times, most recently from 990a051 to 33b72e0 Compare October 10, 2024 17:27
@mattbrictson mattbrictson added the 🏠 Housekeeping Non-user facing cleanup and maintenance label Oct 10, 2024
Copy link
Member

@mattbrictson mattbrictson left a 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! 🙇

@mattbrictson mattbrictson merged commit 88d712a into capistrano:master Oct 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏠 Housekeeping Non-user facing cleanup and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants