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

Support Ruby 3.4 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Support Ruby 3.4 #26

wants to merge 2 commits into from

Conversation

larouxn
Copy link

@larouxn larouxn commented Dec 21, 2024

Disclaimer: I'm not that familiar with this gem. Simply trying to address Ruby 3.4 issues as it will be released in a few days and the amount of warning messages when running our application on Ruby 3.4 is quite large. Thankfully the fixes seem pretty straightforward.

  1. Add base64 to the Gemspec as a runtime dependency as it's no longer a default gem as of Ruby 3.4.
  2. Add frozen_string_literal: true directive and dup all strings that we attempt to modify in place with force_encoding as in place string modification is forbidden with said directive in place.

Resolves #25

@larouxn larouxn changed the title Add Ruby 3.4 support Support Ruby 3.4 Dec 27, 2024
lib/jwe/alg/aes_kw.rb Outdated Show resolved Hide resolved
lib/jwe/alg/aes_kw.rb Outdated Show resolved Hide resolved
lib/jwe/alg/aes_kw.rb Outdated Show resolved Hide resolved
jwe.gemspec Outdated Show resolved Hide resolved
larouxn and others added 2 commits January 7, 2025 11:13
The warning that appears without this change is:

  warning: base64 was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
  You can add base64 to your Gemfile or gemspec to silence this warning.
@larouxn
Copy link
Author

larouxn commented Jan 16, 2025

FYI, have been running this branch in production on Ruby 3.4.1 without issue for a day or so now.

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.

Ruby 3.4 warnings: freezing strings and base64 no longer default gem
3 participants