Skip to content

Ensure compatibility with ruby --enable-frozen-string-literal#64

Open
byroot wants to merge 1 commit intoWinRb:masterfrom
byroot:frozen-string-literal
Open

Ensure compatibility with ruby --enable-frozen-string-literal#64
byroot wants to merge 1 commit intoWinRb:masterfrom
byroot:frozen-string-literal

Conversation

@byroot
Copy link
Copy Markdown

@byroot byroot commented Feb 18, 2025

Ref: https://bugs.ruby-lang.org/issues/20205

Since Ruby 2.4 it is possible to run ruby with --enable-frozen-string-literal and it's supposed to be the default behavior in the future.

It just require some very minor change for this gem to be compatible.

Ref: https://bugs.ruby-lang.org/issues/20205

Since Ruby 2.4 it is possible to run ruby with `--enable-frozen-string-literal`
and it's supposed to be the default behavior in the future.

It just require some very minor change for this gem to be
compatible.
Micaherb added a commit to Micaherb/rubyntlm that referenced this pull request Mar 18, 2026
Replaces the hand-rolled pure-Ruby crypto (MD4/RC4/DES) with upstream's
proper fixes: des-ede-cbc instead of legacy des-cbc (OpenSSL 3.x compat),
upstream's Net::NTLM::Md4 and Net::NTLM::Rc4, and the 0.6.5 non-ASCII
username fix.

Also applies fixes from upstream PR WinRb#64 (unmerged) to ensure compatibility
with --enable-frozen-string-literal (Ruby 3.4 default):
- channel_binding.rb: 'tls-server-end-point'.dup
- md4.rb: "".dup for read buffer
- target_info.rb: ''.b for binary result accumulator
- channel_binding_spec.rb: .b instead of .force_encoding(ASCII_8BIT)

Preserves the Starburst fork's pre-hashed password behaviour (type2.rb).

748 examples, 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Micaherb added a commit to Micaherb/rubyntlm that referenced this pull request Mar 18, 2026
Per-file frozen_string_literal comments only affect the file they appear
in, so the gem's string literals are unaffected by the consuming app's
RuboCop enforcement. Reverting the PR WinRb#64 changes keeps this PR focused
solely on the Ruby 3.4 / OpenSSL 3.x upgrade.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant