Skip to content
This repository
Browse code

The deprecated ActiveSupport::Base64.decode64 method should call ::Ba…

…se64.decode64 not ::Base64.encode64
  • Loading branch information...
commit 44319eff4aa6494e1eb383aa767948b20592da04 1 parent ede01ce
Jonathan Viney authored
2  activesupport/lib/active_support/base64.rb
@@ -40,7 +40,7 @@ def self.encode64(value)
40 40
     def self.decode64(value)
41 41
       ActiveSupport::Deprecation.warn "ActiveSupport::Base64.decode64 " \
42 42
         "is deprecated. Use Base64.decode64 instead", caller
43  
-      ::Base64.encode64(value)
  43
+      ::Base64.decode64(value)
44 44
     end
45 45
 
46 46
     def self.encode64s(value)

3 notes on commit 44319ef

Lukáš Zapletal

Is this a typo? What is wrong here? Should be ENCODE not DECODE.

Piotr Sarnacki
Collaborator

@lzap look at the method name, this is self.decode64 method, therefore it should call decode

Lukáš Zapletal

Ah it was wrong and now it is correct. Was coming from ApiDoc where it was still incorrect :-) Great. TY.

Please sign in to comment.
Something went wrong with that request. Please try again.