redis / redis-rb

A Ruby client library for Redis
MIT License
3.98k stars 1.03k forks source link

Behavior of `pipelined { multi }` changed #1271

Closed jasonpenny closed 6 months ago

jasonpenny commented 6 months ago

Sometime after v4.2.5, the result of code like this changed to return an array instead of the hash expected from hgetall:

    result = r.pipelined do |p|
      p.multi do |m|
        m.hmset("hash", "field", "value", "field2", "value2")
        m.hgetall("hash")
      end
    end

> result
=> ["OK", "QUEUED", "QUEUED", ["OK", ["field", "value", "field2", "value2"]]]

This wrong return value occurs on the 4.x and master branches

jasonpenny commented 6 months ago

The fix was merged, so this should be done with the next published version