lib/rector/backends/redis.rb in rector-0.0.2 vs lib/rector/backends/redis.rb in rector-0.0.3

- old
+ new

@@ -12,19 +12,19 @@ @job_id = job_id end def update_job_data_from_hash(hsh) redis.multi do - redis.sadd(KEY_LIST_SET, hsh.keys) + hsh.keys.each { |k| redis.sadd(KEY_LIST_SET, k) } hsh.each do |key, val| case val when Numeric redis.incrby(key, val) when Set - redis.sadd(key, val.to_a) + val.each { |v| redis.sadd(key, v) } when Enumerable - redis.rpush(key, val) + val.each { |v| redis.rpush(key, v) } end end end end