diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-28 10:22:48 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-28 10:22:48 -0800 |
commit | afe6e059ea216f01d160e4603116356b78df12e5 (patch) | |
tree | e01ada46a3c3b6f2e2a67a8bf4234caf6ff1f995 /activesupport/lib/active_support/base64.rb | |
parent | c8dcc19cf9e40c4387bfc197bc118da16c8469c3 (diff) | |
parent | a19d0f5a66f17c356c5255c5d5930a73a25f627a (diff) | |
download | rails-afe6e059ea216f01d160e4603116356b78df12e5.tar.gz rails-afe6e059ea216f01d160e4603116356b78df12e5.tar.bz2 rails-afe6e059ea216f01d160e4603116356b78df12e5.zip |
Merge pull request #4207 from nashby/deprecate-base64-encode64s
deprecate Base64.encode64s from AS
Diffstat (limited to 'activesupport/lib/active_support/base64.rb')
-rw-r--r-- | activesupport/lib/active_support/base64.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/base64.rb b/activesupport/lib/active_support/base64.rb index b43d2ce9a3..41a1a3469d 100644 --- a/activesupport/lib/active_support/base64.rb +++ b/activesupport/lib/active_support/base64.rb @@ -3,12 +3,16 @@ require 'base64' module ActiveSupport Base64 = ::Base64 + # *DEPRECATED*: Use +Base64.strict_encode64+ instead. + # # Encodes the value as base64 without the newline breaks. This makes the base64 encoding readily usable as URL parameters # or memcache keys without further processing. # # ActiveSupport::Base64.encode64s("Original unencoded string") # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==" def Base64.encode64s(value) - encode64(value).gsub(/\n/, '') + ActiveSupport::Deprecation.warn "encode64s " \ + "is deprecated. Use Base64.strict_encode64 instead", caller + strict_encode64(value) end end |