Skip to content

Commit 9fd381b

Browse files
committed
Better handling of empty stream response [#905]
1 parent 5071cf2 commit 9fd381b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/redis.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3427,9 +3427,7 @@ def method_missing(command, *args) # rubocop:disable Style/MissingRespondToMissi
34273427
private_constant :EMPTY_STREAM_RESPONSE
34283428

34293429
HashifyStreamEntries = lambda { |reply|
3430-
return [] if reply == EMPTY_STREAM_RESPONSE
3431-
3432-
reply.map do |entry_id, values|
3430+
reply.compact.map do |entry_id, values|
34333431
[entry_id, values.each_slice(2).to_h]
34343432
end
34353433
}

0 commit comments

Comments
 (0)