aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-09-22 14:14:24 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-09-22 14:14:24 -0300
commit667ef57de641f4915f50d93f35756892151ee34b (patch)
tree467f331580767a336c50e716b9f4795a3b55a992
parent855184c468aefac2540367cefce603e7d45a937b (diff)
downloadrails-667ef57de641f4915f50d93f35756892151ee34b.tar.gz
rails-667ef57de641f4915f50d93f35756892151ee34b.tar.bz2
rails-667ef57de641f4915f50d93f35756892151ee34b.zip
No need to create a range object
-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 ab2382d98c..3f516d4808 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -130,13 +130,13 @@ module ActiveSupport
hash, dir_1 = hash.divmod(0x1000)
dir_2 = hash.modulo(0x1000)
fname_paths = []
-
+
# Make sure file name doesn't exceed file system limits.
begin
- fname_paths << fname[0...FILENAME_MAX_SIZE]
+ fname_paths << fname[0, FILENAME_MAX_SIZE]
fname = fname[FILENAME_MAX_SIZE..-1]
end until fname.blank?
-
+
File.join(cache_path, DIR_FORMATTER % dir_1, DIR_FORMATTER % dir_2, *fname_paths)
end