Closed aks closed 1 year ago
Thanks for the report! I'm not able to reproduce the issue using the test case you supplied in #239 though:
irb(main):002:0> Moneta::Adapters::Redis.new.delete('non_existent_key')
=> nil
This is using the main
branch with Ruby 3 and v4.8 of the redis gem. Maybe there is some other prerequistite needed for the future
to be nil, like a connection failure or something?
The docs for futures are here - my understanding from reading them is that pipeline.get
will return a future object no matter what (like a promise in JS).
Closing this one for now. Can reopen if we get more info.
Calling DELETE on a missing key returns a nil, which then gets sent the
value
method.The result of delete on a missing key should just be nil.
See https://github.com/moneta-rb/moneta/pull/239