Skip to content
This repository
Browse code

Account for the possibility of a nil options argument to CompressedMe…

…mCacheStore#read/#write
  • Loading branch information...
commit 282b42021306f73d4cc8f8a06713da9a55ed044b 1 parent a5aad2e
Jeffrey Hardy packagethief authored jeremy committed
8 activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
... ... @@ -1,14 +1,14 @@
1 1 module ActiveSupport
2 2 module Cache
3 3 class CompressedMemCacheStore < MemCacheStore
4   - def read(name, options = {})
5   - if value = super(name, options.merge(:raw => true))
  4 + def read(name, options = nil)
  5 + if value = super(name, (options || {}).merge(:raw => true))
6 6 Marshal.load(ActiveSupport::Gzip.decompress(value))
7 7 end
8 8 end
9 9
10   - def write(name, value, options = {})
11   - super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), options.merge(:raw => true))
  10 + def write(name, value, options = nil)
  11 + super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), (options || {}).merge(:raw => true))
12 12 end
13 13 end
14 14 end

0 comments on commit 282b420

Please sign in to comment.
Something went wrong with that request. Please try again.