Permalink
Browse files

No need to create a range object

  • Loading branch information...
1 parent 855184c commit 667ef57de641f4915f50d93f35756892151ee34b @spastorino spastorino committed Sep 22, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/cache/file_store.rb
@@ -130,13 +130,13 @@ def key_file_path(key)
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

0 comments on commit 667ef57

Please sign in to comment.