Conversation
base64 will be removed from the default gems in Ruby 3.4. Switch to using String#unpack1 instead.
dentarg
approved these changes
Aug 15, 2023
Member
|
Any performance implications? |
ioquatix
approved these changes
Aug 15, 2023
Contributor
Should be none? Maybe even faster? https://github.com/ruby/ruby/blob/efd611ceb661a230f121797079376cdb4e831951/lib/base64.rb#L61-L63 |
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this pull request
Oct 25, 2023
Fixes rubocop#12310. This PR drops `base64` gem from runtime dependency. RuboCop only uses `Base64.encode64` from the `base64` gem. Therefore, there's no need to depend on the entire `base64` gem. The implementation of `Base64.encode64` is quite simple: https://github.com/ruby/base64/blob/v0.1.1/lib/base64.rb#L27-L40 This change is a better approach that has also been adopted by rack/rack#2110.
bbatsov
pushed a commit
to rubocop/rubocop
that referenced
this pull request
Oct 26, 2023
Fixes #12310. This PR drops `base64` gem from runtime dependency. RuboCop only uses `Base64.encode64` from the `base64` gem. Therefore, there's no need to depend on the entire `base64` gem. The implementation of `Base64.encode64` is quite simple: https://github.com/ruby/base64/blob/v0.1.1/lib/base64.rb#L27-L40 This change is a better approach that has also been adopted by rack/rack#2110.
7 tasks
This was referenced Dec 22, 2023
|
I wish this stdlib was less cryptic. Why |
This was referenced Jan 2, 2024
Merged
This was referenced Jan 15, 2024
This was referenced Jan 29, 2024
This was referenced Feb 5, 2024
2 tasks
This was referenced Sep 21, 2024
ioquatix
pushed a commit
that referenced
this pull request
May 18, 2025
base64 will be removed from the default gems in Ruby 3.4. Switch to using String#unpack1 instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
base64 will be removed from the default gems in Ruby 3.4. Switch to using String#unpack1 instead.