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

Remove runtime dependency on base64 gem to fix Ruby 3.3 warning #63

Merged
merged 4 commits into from
Dec 25, 2023

Conversation

mattbrictson
Copy link
Collaborator

@mattbrictson mattbrictson commented Dec 25, 2023

The base64 gem will no longer be included with Ruby starting in Ruby 3.4. Starting with Ruby 3.3, a warning is emitted.

The base64 gem is an extremely thin wrapper around String#pack and String#unpack1, so we can use those methods directly and omit the base64 dependency entirely.

I left base64 as a development dependency so that our unit tests can remain unchanged. This gives us confidence that no behavior has been changed as a result of this PR.

Fixes this warning:

base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.

@mattbrictson mattbrictson changed the title Add base64 dependency to fix Ruby 3.3 warning Remove runtime dependency on base64 gem to fix Ruby 3.3 warning Dec 25, 2023
@mattbrictson mattbrictson merged commit 4b87dcf into master Dec 25, 2023
15 checks passed
@mattbrictson mattbrictson deleted the bugs/base64 branch December 25, 2023 18:31
apainintheneck added a commit to Homebrew/brew that referenced this pull request Dec 28, 2023
This was required previously by the `plist` gem and we were requiring
it indirectly. It got removed in v1.7.1 of that gem because it will
no longer be included in the standard library as of Ruby 3.4.

Since we're not currently running on Ruby 3.3 and 3.4 is not out yet,
we can punt on this for now but we'll need to figure out a better
alternative before upgrading to Ruby 3.4.

Related:
- patsplat/plist#63
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.

None yet

1 participant