Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 0b1ce078228f404be63378c000e1af0ee992a321 1 parent e7c6cd3
@mirakui mirakui authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/cache/file_store.rb
View
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
Rack::Utils.unescape(fname)
end

1 comment on commit 0b1ce07

@sobrinho

Some test is covering that?

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