Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XCLAIM exception on nil result #906

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,7 @@
# Unreleased

* Fix xclaim exception on [nil] response. See #905

# 4.1.4

* Alias `Redis#disconnect` as `#close`. See #901.
Expand Down
7 changes: 5 additions & 2 deletions lib/redis.rb
Expand Up @@ -3386,8 +3386,11 @@ def method_missing(command, *args)
}

HashifyStreamEntries = lambda { |reply|
reply.map do |entry_id, values|
[entry_id, values.each_slice(2).to_h]
case reply
when [nil]
[]
else
reply.map { |entry_id, values| [entry_id, values.each_slice(2).to_h] }
end
}

Expand Down