You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using IRB in Ruby 2.0p481, the method actually throws an invalid base64 error.
irb(main):007:0> Base64.strict_encode64("hi there")
=> "aGkgdGhlcmU="
irb(main):008:0> Base64.strict_decode64("aGkgdGhlcmU")
ArgumentError: invalid base64
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/base64.rb:73:in `unpack'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/base64.rb:73:in `strict_decode64'
from (irb):8
from /usr/bin/irb:12:in `<main>'
I took a quick peek, and the Ruby source in the Base64 modules of both versions looks identical. Didn't have time to dive into pack to see what was going on.
The text was updated successfully, but these errors were encountered:
JRuby's
Base64.strict_decode64
doesn't seem to actually be strict. It's easy to reproduce in a REPL.Using IRB in Ruby 2.0p481, the method actually throws an
invalid base64
error.I took a quick peek, and the Ruby source in the
Base64
modules of both versions looks identical. Didn't have time to dive intopack
to see what was going on.The text was updated successfully, but these errors were encountered: