diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-14 23:38:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-14 23:38:45 +0000 |
commit | 066988d2f330961503a58dc139a8f10439575fdf (patch) | |
tree | 5962f0c6fad7c3609fd0edd71918e706b96bf535 /actionpack/lib | |
parent | 823a918a52c1cc6c5707ef923eadb065a471d4a5 (diff) | |
download | rails-066988d2f330961503a58dc139a8f10439575fdf.tar.gz rails-066988d2f330961503a58dc139a8f10439575fdf.tar.bz2 rails-066988d2f330961503a58dc139a8f10439575fdf.zip |
Remove superfluous begin/end in caching.rb methods #836
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 46ef18c010..4c11bc99d8 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -292,11 +292,7 @@ module ActionController #:nodoc: end def read(name, options = {}) #:nodoc: - begin - @mutex.synchronize { @data[name] } - rescue - nil - end + @mutex.synchronize { @data[name] } rescue nil end def write(name, value, options = {}) #:nodoc: @@ -326,20 +322,14 @@ module ActionController #:nodoc: end def write(name, value, options = {}) #:nodoc: - begin - ensure_cache_path(File.dirname(real_file_path(name))) - File.open(real_file_path(name), "w+") { |f| f.write(value) } - rescue => e - Base.logger.info "Couldn't create cache directory: #{name} (#{e.message})" unless Base.logger.nil? - end + ensure_cache_path(File.dirname(real_file_path(name))) + File.open(real_file_path(name), "w+") { |f| f.write(value) } + rescue => e + Base.logger.info "Couldn't create cache directory: #{name} (#{e.message})" unless Base.logger.nil? end def read(name, options = {}) #:nodoc: - begin - IO.read(real_file_path(name)) - rescue - nil - end + IO.read(real_file_path(name)) rescue nil end def delete(name, options) #:nodoc: |