valkey-objects 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/valkey/objects/version.rb +1 -1
- data/lib/valkey/objects.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32d09321f670991b444f2c90843694b054596be914e071f76598019bf95302d1
|
|
4
|
+
data.tar.gz: b2cff91d109c421204ea924aa51eed2e1bd5a7d50ec7baced09926d6945485d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0b9306307f46e9ef2d4e495ddf08f6be8113f43a66568e679fa53a615cff36e8ad468657a126fb5cd302c50c0bb9c0aae0ee649b89cdb8f9f393747827b9eab
|
|
7
|
+
data.tar.gz: 2c5dc3f7a3d98860dc7cfac4b07c1778394669bac0349b8485a237322559262823adc8e6786f161b4b4cb1c996d4933402d99dfdda0b9f4823d237189d618eb3
|
data/lib/valkey/objects.rb
CHANGED
|
@@ -31,7 +31,6 @@ module VK
|
|
|
31
31
|
# set :mySet
|
|
32
32
|
# queue :myQueue
|
|
33
33
|
# place :myPlace
|
|
34
|
-
# pipe :myPipe
|
|
35
34
|
# toggle :myToggle
|
|
36
35
|
# ticker :myTicker
|
|
37
36
|
# entry :myEntry
|
|
@@ -315,8 +314,13 @@ module VK
|
|
|
315
314
|
class VECTOR < O
|
|
316
315
|
include Amatch
|
|
317
316
|
def value &b
|
|
317
|
+
a = []
|
|
318
318
|
VK.redis.call("LRANGE", key, 0, -1).each_with_index { |e, i|
|
|
319
|
-
|
|
319
|
+
if block_given?
|
|
320
|
+
a << b.call(i, VK.redis.call("GET", e))
|
|
321
|
+
else
|
|
322
|
+
a << VK.redis.call("GET", e)
|
|
323
|
+
end
|
|
320
324
|
if @opts.has_key?(:flush) == true
|
|
321
325
|
VK.redis.call("DEL", e);
|
|
322
326
|
end
|
|
@@ -324,6 +328,7 @@ module VK
|
|
|
324
328
|
if @opts.has_key?(:flush) == true
|
|
325
329
|
delete!
|
|
326
330
|
end
|
|
331
|
+
return a
|
|
327
332
|
end
|
|
328
333
|
def [] k
|
|
329
334
|
VK.redis.call("GET", "#{@key}-#{k}");
|