-
-
Notifications
You must be signed in to change notification settings - Fork 939
Base64.decode64 isn't working as MRI implementation #2815
Copy link
Copy link
Closed
Milestone
Description
# ruby 2.2.1p85
Base64.encode64 "some_string"
"c29tZV9zdHJpbmc=\n"
Base64.decode64 "c29tZV9zdHJpbmc"
"some_string"
Base64.urlsafe_decode64 "c29tZV9zdHJpbmc"
ArgumentError: invalid base64
Base64.strict_decode64 "c29tZV9zdHJpbmc"
ArgumentError: invalid base64# jruby 1.7.19 (2.0.0p598)
Base64.encode64 "some_string"
"c29tZV9zdHJpbmc=\n"
Base64.decode64 "c29tZV9zdHJpbmc"
"some_stri"
Base64.urlsafe_decode64 "c29tZV9zdHJpbmc"
"some_stri"
Base64.strict_decode64 "c29tZV9zdHJpbmc"
"some_stri"I saw #2551 issue so some of these were fixed, but what about Base64.decode64? Should it return some_string or some_stri if I remove padding from encoded string?
Reactions are currently unavailable