title: redis-rb multi only increment if key set
body: <p>I want to store a count in redis. I want to increment the count only if the key exists. What am I doing wrong? exists is returning false and the incr is being executed.</p>
  
  <pre><code>key = "blah"
  result = REDIS_DB.multi do
    exists = REDIS_DB.exists(key)
    REDIS_DB.incr(key) if exists
  end
  
  # result: [false, 1]
  </code></pre>
  
  <p>I am new to redis. I just read <a href="http://redis.io/topics/transactions" rel="nofollow">the redis transactions doc</a>. From what I understand, the commands in multi should execute one after the other?</p>
  
  <p>Rails 4.0.2, Redis 3.0.1, <a href="https://github.com/redis/redis-rb" rel="nofollow">redis-rb</a> (A Ruby client library for Redis)</p>