Browse files

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

…mCacheStore#read/#write
  • Loading branch information...
1 parent dc5997f commit 762ee05fce79ac7e5a2537d7bd05f2705d63a7a6 @packagethief packagethief committed with jeremy Aug 13, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
View
8 activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
@@ -1,14 +1,14 @@
module ActiveSupport
module Cache
class CompressedMemCacheStore < MemCacheStore
- def read(name, options = {})
- if value = super(name, options.merge(:raw => true))
+ def read(name, options = nil)
+ if value = super(name, (options || {}).merge(:raw => true))
Marshal.load(ActiveSupport::Gzip.decompress(value))
end
end
- def write(name, value, options = {})
- super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), options.merge(:raw => true))
+ def write(name, value, options = nil)
+ super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), (options || {}).merge(:raw => true))
end
end
end

0 comments on commit 762ee05

Please sign in to comment.