Skip to content

Commit

Permalink
Fix that the options hash can be nil when coming from fragments
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 7, 2008
1 parent 3335bd1 commit 40f6763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/cache/mem_cache_store.rb
Expand Up @@ -31,9 +31,9 @@ def read(key, options = nil)
# Set key = value if key isn't already set. Pass :force => true
# to unconditionally set key = value. Returns a boolean indicating
# whether the key was set.
def write(key, value, options = {})
def write(key, value, options = nil)
super
method = options[:force] ? :set : :add
method = options && options[:force] ? :set : :add
response = @data.send(method, key, value, expires_in(options), raw?(options))
response == Response::STORED
rescue MemCache::MemCacheError => e
Expand Down

0 comments on commit 40f6763

Please sign in to comment.