diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2011-12-24 15:57:54 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2011-12-24 15:57:54 +0300 |
commit | 5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 (patch) | |
tree | da7a9a4d9cd8ad05648bde5d283715d5feea4d81 /activesupport/lib/active_support/cache | |
parent | a5fa310f406e299a1ac54d1a227bde93b7ce282b (diff) | |
download | rails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.tar.gz rails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.tar.bz2 rails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.zip |
deprecate String#encoding_aware? and remove its usage
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 530839b24d..e38a8387b4 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -165,7 +165,7 @@ module ActiveSupport # characters properly. def escape_key(key) key = key.to_s.dup - key = key.force_encoding("BINARY") if key.encoding_aware? + key = key.force_encoding("BINARY") key = key.gsub(ESCAPE_KEY_CHARS){ |match| "%#{match.getbyte(0).to_s(16).upcase}" } key = "#{key[0, 213]}:md5:#{Digest::MD5.hexdigest(key)}" if key.size > 250 key |