Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveSupport::Cache::FileStore#file_path_key does not work if initialized with Pathname #2209

Merged
merged 1 commit into from Jul 23, 2011

Conversation

sumbach
Copy link
Contributor

@sumbach sumbach commented Jul 23, 2011

When you initialize ActiveSupport::Cache::FileStore with a Pathname instance (e.g., Rails.root.join('tmp', 'cache')), #file_path_key does not work correctly--it expects cache_path to be a String, so cache_path.size is the length of the path. When cache_path is a Pathname, cache_path.size is the size of the referenced file or directory on disk.

This appears to have been introduced on 2010-04-27 by commit ee51b51.

See also:

@grzuy
Copy link

grzuy commented Jul 23, 2011

i grabbed this failing test commit, fix the issue and made a pull request with the two commits: #2213

@spastorino spastorino merged commit 3534791 into rails:3-1-stable Jul 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants