pgsql 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/conn.c +3 -3
  3. data/lib/conn_quote.c +3 -12
  4. data/lib/module.c +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d735e83feb39d55f95efc1a196d433800c523fd0e73538b2c6415edd098f405c
4
- data.tar.gz: e8e6e0b0526a73de32bf227effe13337ef125ea9f69d05099401aae4455c4288
3
+ metadata.gz: '09bfda9c735da18dfbd986a66e29ad0fb7d7a89257e47fe2696094e6deb6d012'
4
+ data.tar.gz: ffb57400fdf3a67e777a76f8070d85c785bd3a588679da9316e620c96460ff84
5
5
  SHA512:
6
- metadata.gz: bbccf68542f27fc341ed1b517109655d5dd96b9d8cb21ac94e9d874f54d40eec9b3f50652967bb592cf04da68804c1351e01598ab8e4f3487ecc50b706dee65a
7
- data.tar.gz: 388001a630086ddb47acb19672291ebe1cbd95f0349038e97189ff676e246047c4ce055bc726d065a9aea399cfdf1ff8d1e62d293178ebc6b8c131b10e4b951a
6
+ metadata.gz: eda3796cb0d7604b3e2119d08f6cea4cee5d1a1455ceee2fa018fbbc5a9426f88d97ffd1714e9d01879fd6b5fadbafe2eb23b4b60b959f85d7a85c73aa9311e1
7
+ data.tar.gz: b9cd0c5e075530a708bca6956977dfd7482b3e478186fb1bc169633ce1d4fcbf8f02f88668a3dcca3552103c545f0c1a19d6d89190cfd5441ed7a7d4cbce51aa
data/lib/conn.c CHANGED
@@ -166,7 +166,7 @@ pgconn_mkstring( struct pgconn_data *ptr, const char *str)
166
166
  VALUE r;
167
167
 
168
168
  if (str) {
169
- r = rb_tainted_str_new2( str);
169
+ r = rb_str_new2( str);
170
170
  pgconn_encode_out4in( ptr, r);
171
171
  } else
172
172
  r = Qnil;
@@ -179,7 +179,7 @@ pgconn_mkstringn( struct pgconn_data *ptr, const char *str, int len)
179
179
  VALUE r;
180
180
 
181
181
  if (str) {
182
- r = rb_tainted_str_new( str, len);
182
+ r = rb_str_new( str, len);
183
183
  pgconn_encode_out4in( ptr, r);
184
184
  } else
185
185
  r = Qnil;
@@ -438,7 +438,7 @@ pgconn_client_encoding( VALUE self)
438
438
  {
439
439
  char *encoding = (char *) pg_encoding_to_char(
440
440
  PQclientEncoding( get_pgconn( self)->conn));
441
- return rb_tainted_str_new2( encoding);
441
+ return rb_str_new2( encoding);
442
442
  }
443
443
 
444
444
  /*
data/lib/conn_quote.c CHANGED
@@ -159,7 +159,6 @@ pgconn_escape_bytea( VALUE self, VALUE str)
159
159
  (unsigned char *) RSTRING_PTR( str), RSTRING_LEN( str), &l);
160
160
  ret = rb_str_new( (char *) s, l - 1);
161
161
  PQfreemem( s);
162
- OBJ_INFECT( ret, str);
163
162
  return ret;
164
163
  }
165
164
 
@@ -216,7 +215,6 @@ pgconn_unescape_bytea( VALUE self, VALUE obj)
216
215
  rb_enc_associate( ret, rb_to_encoding( enc));
217
216
  #endif
218
217
 
219
- OBJ_INFECT( ret, obj);
220
218
  return ret;
221
219
  }
222
220
 
@@ -285,10 +283,9 @@ pgconn_stringize( VALUE self, VALUE obj)
285
283
  VALUE co;
286
284
 
287
285
  co = CLASS_OF( obj);
288
- if (co == rb_cTime) {
286
+ if (co == rb_cTime)
289
287
  result = rb_funcall( obj, id_iso8601, 0);
290
- OBJ_INFECT( result, obj);
291
- } else if (co == rb_cDate)
288
+ else if (co == rb_cDate)
292
289
  result = rb_obj_as_string( obj);
293
290
  else if (co == rb_cDateTime)
294
291
  result = rb_obj_as_string( obj);
@@ -298,7 +295,6 @@ pgconn_stringize( VALUE self, VALUE obj)
298
295
  else if (rb_respond_to( obj, id_to_postgres)) {
299
296
  result = rb_funcall( obj, id_to_postgres, 0);
300
297
  StringValue( result);
301
- OBJ_INFECT( result, obj);
302
298
  } else
303
299
  result = rb_obj_as_string( obj);
304
300
  }
@@ -428,10 +424,8 @@ stringize_array( VALUE self, VALUE result, VALUE ary)
428
424
  rb_str_buf_cat2( result, ",");
429
425
  }
430
426
  r = pgconn_stringize( self, *o);
431
- if (!NIL_P( *o)) {
427
+ if (!NIL_P( *o))
432
428
  r = dquote_string( r);
433
- OBJ_INFECT( result, *o);
434
- }
435
429
  rb_str_buf_append( result, r);
436
430
  }
437
431
  return result;
@@ -542,7 +536,6 @@ VALUE pgconn_quote( VALUE self, VALUE obj)
542
536
  rb_str_buf_cat2( res, "::");
543
537
  rb_str_buf_cat2( res, type);
544
538
  }
545
- OBJ_INFECT( res, obj);
546
539
  }
547
540
  break;
548
541
  }
@@ -578,7 +571,6 @@ quote_string( VALUE conn, VALUE str)
578
571
  res = rb_str_new2( p);
579
572
  PQfreemem( p);
580
573
  rb_enc_associate( res, rb_enc_get( str));
581
- OBJ_INFECT( res, str);
582
574
  return res;
583
575
  }
584
576
 
@@ -643,7 +635,6 @@ pgconn_quote_identifier( VALUE self, VALUE str)
643
635
  res = rb_str_new2( p);
644
636
  PQfreemem( p);
645
637
  rb_enc_associate( res, rb_enc_get( str));
646
- OBJ_INFECT( res, str);
647
638
  return res;
648
639
  }
649
640
 
data/lib/module.c CHANGED
@@ -8,7 +8,7 @@
8
8
  #include "result.h"
9
9
 
10
10
 
11
- #define PGSQL_VERSION "1.9.1"
11
+ #define PGSQL_VERSION "1.9.2"
12
12
 
13
13
 
14
14
  VALUE rb_mPg;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgsql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-14 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autorake
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  requirements:
75
75
  - PostgreSQL
76
- rubygems_version: 3.0.8
76
+ rubygems_version: 3.4.17
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: PostgreSQL-API for Ruby