valkey-objects 0.1.6 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95b4899445513de587a18793a7a1f922aeb91765da84e16eb2d79d51e79b2c32
4
- data.tar.gz: 4a1edf50e93b4a1651f8fa14e5858469187d3be433aa07edd9979b45dcf5b507
3
+ metadata.gz: b2d76e237c36d52756f924cce5766312f630e6ae7c4a378aa7c0850fa945ed58
4
+ data.tar.gz: 3a320e4c5278fe4974b4749f4788c9eedc7b984a7d1949ff39ab22be3bedfe2b
5
5
  SHA512:
6
- metadata.gz: 32e9005b26cccf862edf94a206f31458b0e5a8257b36fc7302dce6f4496188ec0b0e1f22825ce5a85a1788bb71e9922b08ccc61030ec4a9a0c8a6165ebdcfbba
7
- data.tar.gz: 6164abc6a2f1fdfa391cbd745d1b152150ddc21c5dc41ae2aa339fbcf23fb118248d1a140f78dd073d47ee54cad7f5aeb0bf95e2b10996e382c38943598a67c2
6
+ metadata.gz: 864a0c22c28689313528d526b1fd26cafc3957df0a75f7a72cfcc30b87860233a7d9e2c440bbd4e95af1e87777aa589fe075d8da350400c17290321762596695
7
+ data.tar.gz: a9554e5a2e77b8420c9df3a0b15031237c1d1f6e1f6844c14bc510117e3755a83483f4c26a30a6744124314062bb27fef5dbd35d8c75483fddabf81bdd021584
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Valkey
4
4
  module Objects
5
- VERSION = "0.1.6"
5
+ VERSION = "0.1.8"
6
6
  end
7
7
  end
@@ -242,6 +242,14 @@ module VK
242
242
  def value= x
243
243
  VK.redis.call("SET", key, x)
244
244
  end
245
+ def match r, &b
246
+ m = Regexp.new(r).match(value)
247
+ if block_given?
248
+ b.call(m)
249
+ else
250
+ return m
251
+ end
252
+ end
245
253
  end
246
254
 
247
255
  class C < O
@@ -306,7 +314,7 @@ module VK
306
314
  VK.redis.call("SMEMBERS", key).each_with_index { |e, i| b.call(i, e) }
307
315
  end
308
316
  def include? k
309
- if VK.redis.call("SMISMEMBER", key, k)[0] == 1
317
+ if VK.redis.call("SMISMEMBER", key, k)[0] == 0
310
318
  return false
311
319
  else
312
320
  return true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkey-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson