From e21ded072b232c8cfeb25022e09730265f450f5b Mon Sep 17 00:00:00 2001 From: crash2burn Date: Tue, 16 Aug 2011 11:27:21 -0400 Subject: [PATCH] fix error with get in compatibility module --- lib/dalli/compatibility.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dalli/compatibility.rb b/lib/dalli/compatibility.rb index 99b027aa..f422108e 100644 --- a/lib/dalli/compatibility.rb +++ b/lib/dalli/compatibility.rb @@ -38,7 +38,7 @@ def replace(key, value, ttl = nil, options = nil) def get(key, options = nil) value = super(key, options) if value && value.is_a?(String) && !options && value.size > 2 && - bytes = value.unpack('cc') && bytes[0] == 4 && bytes[1] == 8 + (bytes = value.unpack('cc')) && bytes[0] == 4 && bytes[1] == 8 return Marshal.load(value) rescue value end value