diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-27 13:09:41 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-27 20:30:29 +0200 |
commit | a822ce78b39db60fef9d8c3280551f199c91c6b3 (patch) | |
tree | 0bc7114cf3b322eca4e9126047457e3a3a077ba2 /activesupport/lib/active_support/cache | |
parent | fa96638bf2c5c97571849715cb8298c7a3b058ca (diff) | |
download | rails-a822ce78b39db60fef9d8c3280551f199c91c6b3.tar.gz rails-a822ce78b39db60fef9d8c3280551f199c91c6b3.tar.bz2 rails-a822ce78b39db60fef9d8c3280551f199c91c6b3.zip |
String#[] doesn't return the byte representation on 1.9.2, we should use getbyte that was already added as a Ruby < 1.9 core_ext
Signed-off-by: José Valim <jose.valim@gmail.com>
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 3c46ae5424..852defeae8 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -159,7 +159,7 @@ module ActiveSupport private def escape_key(key) - key = key.to_s.gsub(ESCAPE_KEY_CHARS){|match| "%#{match[0].to_s(16).upcase}"} + key = key.to_s.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 end |