Skip to content

Commit

Permalink
fix error with get in compatibility module
Browse files Browse the repository at this point in the history
  • Loading branch information
crash2burn committed Aug 16, 2011
1 parent bfe4b8f commit e21ded0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dalli/compatibility.rb
Expand Up @@ -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
Expand Down

0 comments on commit e21ded0

Please sign in to comment.