diff options
author | Issei Naruta <mimitako@gmail.com> | 2012-02-21 18:35:31 +0900 |
---|---|---|
committer | Issei Naruta <mimitako@gmail.com> | 2012-02-21 18:35:31 +0900 |
commit | 0b1ce078228f404be63378c000e1af0ee992a321 (patch) | |
tree | c38ea2770ecd582ead17be412e8f413b28cdec00 /activesupport | |
parent | e7c6cd308e9dfa6ebd4b231548d82bc05760e3b7 (diff) | |
download | rails-0b1ce078228f404be63378c000e1af0ee992a321.tar.gz rails-0b1ce078228f404be63378c000e1af0ee992a321.tar.bz2 rails-0b1ce078228f404be63378c000e1af0ee992a321.zip |
Bug: cache_path.size doesn't return length of filename but size of file if cache_path is Pathname.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 9460532af0..b7712a4a15 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -143,7 +143,7 @@ module ActiveSupport # Translate a file path into a key. def file_path_key(path) - fname = path[cache_path.size, path.size].split(File::SEPARATOR, 4).last + fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last Rack::Utils.unescape(fname) end |