Skip to content
Browse files

Bug: cache_path.size doesn't return length of filename but size of fi…

…le if cache_path is Pathname.
  • Loading branch information...
1 parent e7c6cd3 commit 0b1ce078228f404be63378c000e1af0ee992a321 @mirakui mirakui committed Feb 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache/file_store.rb
2 activesupport/lib/active_support/cache/file_store.rb
@@ -143,7 +143,7 @@ def key_file_path(key)
# 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

1 comment on commit 0b1ce07


Some test is covering that?

Please sign in to comment.
Something went wrong with that request. Please try again.