aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
diff options
context:
space:
mode:
authorJeffrey Hardy <packagethief@gmail.com>2008-08-13 00:51:47 -0400
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-13 04:19:31 -0700
commit282b42021306f73d4cc8f8a06713da9a55ed044b (patch)
treedd6455d6678fad0b39a59c07c728f5e679451938 /activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
parenta5aad2e81febfa1a8d9fea0faffb5a3b4535982b (diff)
downloadrails-282b42021306f73d4cc8f8a06713da9a55ed044b.tar.gz
rails-282b42021306f73d4cc8f8a06713da9a55ed044b.tar.bz2
rails-282b42021306f73d4cc8f8a06713da9a55ed044b.zip
Account for the possibility of a nil options argument to CompressedMemCacheStore#read/#write
Diffstat (limited to 'activesupport/lib/active_support/cache/compressed_mem_cache_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/compressed_mem_cache_store.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb b/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
index 9470ac9f66..0bff6cf9ad 100644
--- a/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
+++ b/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