public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Account for the possibility of a nil options argument to 
CompressedMemCacheStore#read/#write
Jeffrey Hardy (author)
Tue Aug 12 21:51:47 -0700 2008
jeremy (committer)
Wed Aug 13 04:19:31 -0700 2008
commit  282b42021306f73d4cc8f8a06713da9a55ed044b
tree    dd6455d6678fad0b39a59c07c728f5e679451938
parent  a5aad2e81febfa1a8d9fea0faffb5a3b4535982b
...
1
2
3
4
5
 
 
6
7
8
9
10
11
 
 
12
13
14
...
1
2
3
 
 
4
5
6
7
8
9
 
 
10
11
12
13
14
0
@@ -1,14 +1,14 @@
0
 module ActiveSupport
0
   module Cache
0
     class CompressedMemCacheStore < MemCacheStore
0
-      def read(name, options = {})
0
-        if value = super(name, options.merge(:raw => true))
0
+      def read(name, options = nil)
0
+        if value = super(name, (options || {}).merge(:raw => true))
0
           Marshal.load(ActiveSupport::Gzip.decompress(value))
0
         end
0
       end
0
 
0
-      def write(name, value, options = {})
0
-        super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), options.merge(:raw => true))
0
+      def write(name, value, options = nil)
0
+        super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), (options || {}).merge(:raw => true))
0
       end
0
     end
0
   end

Comments