diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-19 00:14:50 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-19 00:14:50 +0200 |
commit | e5919536a6d8372937b9bc34940f3daf4108290d (patch) | |
tree | 73bea5fe7b29a7932a272bbad3294844134dd05b /activesupport | |
parent | 1d8be7bc6f098b829ac14ef457af688043975ddc (diff) | |
parent | 64e2a549cf92f25026a85575940a722492310125 (diff) | |
download | rails-e5919536a6d8372937b9bc34940f3daf4108290d.tar.gz rails-e5919536a6d8372937b9bc34940f3daf4108290d.tar.bz2 rails-e5919536a6d8372937b9bc34940f3daf4108290d.zip |
Merge branch 'master' of https://github.com/rails/rails into multi_json
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 9936b33e22..a1376ae52a 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -121,7 +121,7 @@ module ActiveSupport # Lock a file for a block so only one process can modify it at a time. def lock_file(file_name, &block) # :nodoc: if File.exist?(file_name) - File.open(file_name, 'r') do |f| + File.open(file_name, 'r+') do |f| begin f.flock File::LOCK_EX yield |