We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5111d7f commit ec868ecCopy full SHA for ec868ec
lib/base64.rb
@@ -81,8 +81,9 @@ def strict_decode64(str)
81
# Note that the result can still contain '='.
82
# You can remove the padding by setting +padding+ as false.
83
def urlsafe_encode64(bin, padding: true)
84
- str = strict_encode64(bin).tr("+/", "-_")
85
- str = str.delete("=") unless padding
+ str = strict_encode64(bin)
+ str.tr!("+/", "-_")
86
+ str.delete!("=") unless padding
87
str
88
end
89
0 commit comments