Skip to content

Fix frozen string literal support#83

Merged
mfazekas merged 6 commits into
masterfrom
fix-frozen-string-ci
May 16, 2026
Merged

Fix frozen string literal support#83
mfazekas merged 6 commits into
masterfrom
fix-frozen-string-ci

Conversation

@mfazekas

@mfazekas mfazekas commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

Fix frozen string literal compatibility and CI.

  • Use mutable string (+'') for channel[:error_string] — was raising FrozenError instead of Net::SCP::Error when appending error messages
  • Pin net-ssh >= 7.3.1 in Gemfile for CI (frozen string fixes in net-ssh)
  • Drop EOL Ruby 2.3–2.5 from CI matrix (net-ssh 7.x requires >= 2.6)
  • Make rdoc/task optional for Ruby 4.0+ compatibility

mfazekas and others added 3 commits February 17, 2026 06:23
Drop EOL Ruby 2.3-2.5 from CI matrix (net-ssh 7.x requires >= 2.6).
rdoc was removed from default gems in Ruby 4.0.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread Gemfile
# Specify your gem's dependencies in mygem.gemspec
gemspec

gem "net-ssh", ">= 7.3.1"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should the gem version be specified in net-scp.gemspec instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think it's fine, in gem spec it would me a backward incompat change. Users can still use with older net-ssh for example if they are on ruby not supported by later net-ssh, just frozen string literals will not fully work for them.

mfazekas added 2 commits May 16, 2026 12:54
Use mutable string (+''} for channel[:error_string] so appending
error messages works with frozen_string_literal enabled.
@mfazekas mfazekas changed the title Use net-ssh 7.3.1.rc1 to fix frozen string literal CI failures Fix frozen string literal support May 16, 2026
@mfazekas
mfazekas merged commit 7a245c3 into master May 16, 2026
8 checks passed
@mfazekas

Copy link
Copy Markdown
Collaborator Author

This fix is now available in net-scp 4.1.1.rc3 on RubyGems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants