Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Ruby <2.3 base64 decoding workaround
In older Ruby versions, WebPush.decode64 was introduced to wrap Base64.urlsafe_decode64 to prevent errors decoding "unpadded" urlsafe-encoded input. Since Ruby 2.3, Base64.urlsafe_decode64 can now gracefully decode padded and unpadded input. Given WebPush now supports Ruby 3+, we should be able to remove this workaround gracefully. I've added basic specs to demonstrate and perhaps catch any potential (though unlikely) future regressions in Ruby. For historical discussion of the issue: https://bugs.ruby-lang.org/issues/10740
- Loading branch information