We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44447f2 commit f9259a6Copy full SHA for f9259a6
lib/redis/namespace.rb
@@ -104,6 +104,7 @@ class Namespace
104
"linsert" => [ :first ],
105
"llen" => [ :first ],
106
"lpop" => [ :first ],
107
+ "lpos" => [ :first ],
108
"lpush" => [ :first ],
109
"lpushx" => [ :first ],
110
"lrange" => [ :first ],
spec/redis_spec.rb
@@ -100,6 +100,12 @@
100
expect(@redis.get('foo')).to eq('bar')
101
end
102
103
+ it 'should be able to use a namespace with lpos' do
+ @namespaced.rpush('foo', %w[a b c 1 2 3 c c])
+ expect(@namespaced.lpos('foo', 'c')).to eq(2)
+ expect(@redis.lpos('mykey', 'c')).to be_nil
+ end
+
it 'should be able to use a namespace with brpoplpush' do
@namespaced.lpush('foo','bar')
111
expect(@namespaced.brpoplpush('foo','bar',0)).to eq('bar')
0 commit comments