From 3a59eab5f78f4c11915eba150c88ce384d046dff Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 12 May 2012 09:18:37 -0300 Subject: [PATCH] Remove wrong rack/utils dependency from AS Closes #6274 --- activesupport/lib/active_support/cache/file_store.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index e7316b23b3..89bdb741d0 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -1,7 +1,7 @@ require 'active_support/core_ext/file/atomic' require 'active_support/core_ext/string/conversions' require 'active_support/core_ext/object/inclusion' -require 'rack/utils' +require 'uri/common' module ActiveSupport module Cache @@ -126,7 +126,7 @@ module ActiveSupport # Translate a key into a file path. def key_file_path(key) - fname = Rack::Utils.escape(key) + fname = URI.encode_www_form_component(key) hash = Zlib.adler32(fname) hash, dir_1 = hash.divmod(0x1000) dir_2 = hash.modulo(0x1000) @@ -144,7 +144,7 @@ module ActiveSupport # Translate a file path into a key. def file_path_key(path) fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last - Rack::Utils.unescape(fname) + URI.decode_www_form_component(fname, Encoding::UTF_8) end # Delete empty directories in the cache.