nrk/redis-lua

`nil` argument wrongly gets converted to empty string

Habbie opened this issue · 0 comments

From the protocol docs:

The client library API should not return an empty string, but a nil object, when the server replies with a Null Bulk String. For example a Ruby library should return 'nil' while a C library should return NULL (or set a special flag in the reply object), and so forth.

There is no language on nils in commands, and sending an actual nil makes Redis complain. This leads me to believe there is simply no valid situation in which you pass nil to a command. Because of that, I think the 'map to empty' fix for #29 is wrong.