redis / redis-rb

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

Behavior of `pipelined { multi }` changed #1271

Closed jasonpenny closed 4 months ago

jasonpenny commented 4 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 4 months ago

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