lib/redis/connection/memory.rb in fakeredis-0.2.1 vs lib/redis/connection/memory.rb in fakeredis-0.2.2

- old
+ new

@@ -6,16 +6,16 @@ class Memory # Represents a normal hash with some additional expiration information # associated with each key class ExpiringHash < Hash attr_reader :expires - + def initialize(*) super @expires = {} end - + def [](key) delete(key) if expired?(key) super end @@ -56,17 +56,18 @@ true end end end end - + include Redis::Connection::CommandHelper def initialize @data = ExpiringHash.new @connected = false @replies = [] + @buffer = nil end def connected? @connected end @@ -575,11 +576,9 @@ def hexists(key, field) return unless @data[key] fail "Not a hash" unless @data[key].is_a?(Hash) @data[key].key?(field) end - - def monitor ; end def sync ; end def [](key) get(key)