hiredis-client 0.6.0 → 0.7.0

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: ba60e75acf78441a3ee79cc33c7dd02be25481a229e6c3a697f6595864da50f5
4
- data.tar.gz: 8e850b60219abce73e320a42b610fadfec522ab0f926c429a98f6c51dcfd862f
3
+ metadata.gz: fb8bb0345051007ea9a61892571ec1844c7dc0a7615a36585ed447ff78a9416f
4
+ data.tar.gz: 6eb4a84f81a101fffeccf0fe05b4c01a87fd1b4820369519dacb6757690c8398
5
5
  SHA512:
6
- metadata.gz: 86f117da17118c442f127d11eec64d9dea91fb3da1070a111e2be1611815056e4443bcc2904d8e709bd3a4095e1704f9c32a47fb6a09688670c9f4d9221f4635
7
- data.tar.gz: fa1896db0cf13d0d33ad812659f381968de920e1516fc05aa1467e1c302fd958b3fbfa9919171f6bdaff63a44e8d21c13de9fb8efd1b56524d6f84d1961d865a
6
+ metadata.gz: 07bfb30ed3ea61f622b50d22cd183ded5107fe1651225e6688c0298148c2af54502134076104f747c1b2d26645d145aa6d7d0f088d041a2dc312854a45b76ee9
7
+ data.tar.gz: 9fb7db0069ac614d1436d51f9d59b583679eb3185b36d86feb6ae8505af30e6347d841544f5d868d742e8cdd92dbdf8b713c6ef30acc4390d3f3921585e47315
@@ -48,13 +48,13 @@ static inline VALUE rb_hash_new_capa(long capa)
48
48
 
49
49
  static VALUE rb_eRedisClientCommandError, rb_eRedisClientConnectionError, rb_eRedisClientCannotConnectError, rb_eRedisClientProtocolError;
50
50
  static VALUE rb_eRedisClientReadTimeoutError, rb_eRedisClientWriteTimeoutError;
51
- static ID id_parse, id_add, id_new;
51
+ static ID id_parse;
52
52
 
53
53
  typedef struct {
54
54
  redisSSLContext *context;
55
55
  } hiredis_ssl_context_t;
56
56
 
57
- #define ENSURE_CONNECTED(connection) if (!connection->context) rb_raise(rb_eRuntimeError, "[BUG] not connected");
57
+ #define ENSURE_CONNECTED(connection) if (!connection->context) rb_raise(rb_eRedisClientConnectionError, "Not connected");
58
58
 
59
59
  #define SSL_CONTEXT(from, name) \
60
60
  hiredis_ssl_context_t *name = NULL; \
@@ -127,6 +127,7 @@ static void *reply_append(const redisReadTask *task, VALUE value) {
127
127
 
128
128
  switch (task->parent->type) {
129
129
  case REDIS_REPLY_ARRAY:
130
+ case REDIS_REPLY_SET:
130
131
  case REDIS_REPLY_PUSH:
131
132
  rb_ary_store(parent, task->idx, value);
132
133
  break;
@@ -139,9 +140,6 @@ static void *reply_append(const redisReadTask *task, VALUE value) {
139
140
  task->parent->privdata = (void*)value;
140
141
  }
141
142
  break;
142
- case REDIS_REPLY_SET:
143
- rb_funcall(parent, id_add, 1, value);
144
- break;
145
143
  default:
146
144
  rb_bug("[hiredis] Unexpected task parent type %d", task->parent->type);
147
145
  break;
@@ -707,8 +705,6 @@ void Init_hiredis_connection(void) {
707
705
  redisInitOpenSSL();
708
706
 
709
707
  id_parse = rb_intern("parse");
710
- id_add = rb_intern("add");
711
- id_new = rb_intern("new");
712
708
 
713
709
  VALUE rb_cRedisClient = rb_const_get(rb_cObject, rb_intern("RedisClient"));
714
710
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiredis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.0
19
+ version: 0.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.6.0
26
+ version: 0.7.0
27
27
  description:
28
28
  email:
29
29
  - jean.boussier@gmail.com