aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-05-12 09:18:37 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-05-12 09:18:39 -0300
commit3a59eab5f78f4c11915eba150c88ce384d046dff (patch)
tree93279a5aa448b833caa3c76d1c43385295559a00 /activesupport/lib/active_support/cache/file_store.rb
parent905c48eab3f806b7bac7fb70e8ba8803d6c0d88e (diff)
downloadrails-3a59eab5f78f4c11915eba150c88ce384d046dff.tar.gz
rails-3a59eab5f78f4c11915eba150c88ce384d046dff.tar.bz2
rails-3a59eab5f78f4c11915eba150c88ce384d046dff.zip
Remove wrong rack/utils dependency from AS
Closes #6274
Diffstat (limited to 'activesupport/lib/active_support/cache/file_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb6
1 files 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.