sequel_pg 1.6.13 → 1.6.14

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
  SHA1:
3
- metadata.gz: e8104080b7db1a481d297cc9d19e77725ba72904
4
- data.tar.gz: eaa3df5bb5d4318dd3bb15d5b5640bcca048f97a
3
+ metadata.gz: 91af2dd3a1d7acffb3c537705be4133d7dfd354e
4
+ data.tar.gz: 819ee4e9762bd7650ff1dd1d1597322ad6f1c02f
5
5
  SHA512:
6
- metadata.gz: 2e68206b634546f858e6161f8d2a67591d470b6d8b1f74a7d93523d992fc2fa43d4f00e132797e9029b03dd4025c7582e16744f2a174846b7be2bd9e25c71037
7
- data.tar.gz: d463c3bcd342ac9e9fc219bbcc751630ef557113ba07a0106f51be25f19d364ff4851418025eee66b1045244205ca72772c39c8ad79d848247641ad102b71bfe
6
+ metadata.gz: abfbce08b4c38a56a20de00cd72f8e66ca2dadfaaf5af1ab26748f962e5aec9abb6fb47ab428c7e3d58404a7b67c4515da5699def99bf5a8985ce1855c35b757
7
+ data.tar.gz: 7cb3f3988ba3de7877e3686ff801841cbb53bddb506e6f1148a974930c7c61bd8d0834a822c0dcb0903a17dc8076b9687acb88351ced933a931d37625401d7d4
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.6.14 (2016-01-19)
2
+
3
+ * Make array parser ignore explicit bounds (jeremyevans)
4
+
1
5
  === 1.6.13 (2015-06-29)
2
6
 
3
7
  * Fix Dataset#paged_each when called with no arguments (jeremyevans)
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2012 Jeremy Evans
1
+ Copyright (c) 2010-2016 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
@@ -246,6 +246,27 @@ static VALUE parse_pg_array(VALUE self, VALUE pg_array_string, VALUE converter)
246
246
  char *word = RSTRING_PTR(buf);
247
247
  int index = 1;
248
248
 
249
+ if (array_string_length == 0) {
250
+ rb_raise(rb_eArgError, "unexpected PostgreSQL array format, empty");
251
+ }
252
+
253
+ switch (c_pg_array_string[0]) {
254
+ case '[':
255
+ /* Skip explicit subscripts, scanning until opening array */
256
+ for(;index < array_string_length && c_pg_array_string[index] != '{'; ++index)
257
+ /* nothing */;
258
+
259
+ if (index >= array_string_length) {
260
+ rb_raise(rb_eArgError, "unexpected PostgreSQL array format, no {");
261
+ } else {
262
+ ++index;
263
+ }
264
+ case '{':
265
+ break;
266
+ default:
267
+ rb_raise(rb_eArgError, "unexpected PostgreSQL array format, doesn't start with { or [");
268
+ }
269
+
249
270
  return read_array(&index, c_pg_array_string, array_string_length, word, converter
250
271
  #ifdef SPG_ENCODING
251
272
  , enc_get_index(pg_array_string)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.13
4
+ version: 1.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.5
94
+ rubygems_version: 2.5.1
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Faster SELECTs when using Sequel with pg