We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
srem?
Both sadd and sadd? adds a value into a set. But I'm confused that srem? doesn't remove a value like srem. Is it correct?
sadd
sadd?
srem
RUBY_VERSION #=> "3.0.6" Redis::VERSION #=> "4.8.1" Redis::Namespace::VERSION #=> "1.10.0" require "redis-namespace" redis_connection = Redis.new(host: ENV["REDIS_HOST"], port: ENV["REDIS_PORT"]) redis = Redis::Namespace.new("Rspec Instance", redis: redis_connection) set_key = "foo:bar" redis.smembers set_key #=> [] redis.sadd set_key, 1 #=> true redis.sadd? set_key, 2 #=> true $redis.smembers set_key #=> ["1", "2"] redis.srem set_key, 1 #=> true redis.srem? set_key, 2 #=> false $redis.smembers set_key #=> ["2"] $redis.srem set_key, 2 #=> true $redis.smembers set_key #=> []
The text was updated successfully, but these errors were encountered:
It has already fixed in #224 and v1.11.0. After updating my issue was fixed.
Sorry, something went wrong.
No branches or pull requests
Both
sadd
andsadd?
adds a value into a set.But I'm confused that
srem?
doesn't remove a value likesrem
. Is it correct?The text was updated successfully, but these errors were encountered: