Skip to content

Commit 5071cf2

Browse files
authored
Merge pull request #929 from redis/handle-empty-stream-responses
Handle empty stream responses
2 parents 0546fe6 + 7b8ac45 commit 5071cf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/redis.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3423,7 +3423,12 @@ def method_missing(command, *args) # rubocop:disable Style/MissingRespondToMissi
34233423
end
34243424
}
34253425

3426+
EMPTY_STREAM_RESPONSE = [nil].freeze
3427+
private_constant :EMPTY_STREAM_RESPONSE
3428+
34263429
HashifyStreamEntries = lambda { |reply|
3430+
return [] if reply == EMPTY_STREAM_RESPONSE
3431+
34273432
reply.map do |entry_id, values|
34283433
[entry_id, values.each_slice(2).to_h]
34293434
end

0 commit comments

Comments
 (0)