sqlite3 2.0.0 → 2.0.1

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: 8a0bf66dc101ae27922443dfe78d8b876f95d94d4e1c77cef9ee94db6d4a77ba
4
- data.tar.gz: 622b08d45d83da2cbad09e16340ff4aea6547f4583bb5bb82d2836fedabc62e3
3
+ metadata.gz: a1d1281e03d34b5b04218274d0eacdffcc4b5f54a40ea0923aa128eeed22dbe5
4
+ data.tar.gz: 196c5fba4a58b976ef2c3b58d69e0e908959004a43848a919e75c00ab1d3e478
5
5
  SHA512:
6
- metadata.gz: b065f2e43d2d0a64f74bc47d75fe71be7bfa7f39a6a58099c44fefe3f185eb84bc8f866521d8a3fcf0cea2a1dd4f98e5f4c079ee241a6c7ee124603c16561932
7
- data.tar.gz: 0f42a5c3b23dd84b02fbd70f2f5bb4383056bb17be78e4356825eae3fb9afc238af782406ce8c0fc48ab0ce1557e4dcce660c2429e41224339200443846f6688
6
+ metadata.gz: a00c1989b79aa0727bee1f4092b71a684bc62683ed8d10f0a6e6161df1ade832ed0486a346b2a0da7110a837c91f9747134d99a3e4d0c6e012c0d912a4f7a464
7
+ data.tar.gz: 5af7c609165c0f4107e2b42d1720a9223cdce87ad8a7b7fa7887a7f29cad5d7b47e9068439a89628c2ef9a6bf4361d1d0cdbcc56451b80a6e694f75c98d5f895
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # sqlite3-ruby Changelog
2
2
 
3
+ ## 2.0.1 / 2024-04-20
4
+
5
+ ### Fixed
6
+
7
+ - Raise `ArgumentError` if `Database#execute`, `#execute_batch`, or `#query` are passed multiple bind parameters that are not in an Array. In v2.0.0 these methods would silently swallow additional arguments, and this change makes the failure explicit. See the CHANGELOG notes for v2.0.0 for examples on how to update your code. [#527] @flavorjones
8
+ - Fixed a regression in v2.0.0 that caused `Database#execute_batch` to raise an encoding exception when passed some non-ascii strings. As a result of this fix, `Database#prepare` now ensures the "remainder" string will always be encoded as UTF-8. [#524] @flavorjones
9
+
10
+
3
11
  ## 2.0.0 / 2024-04-17
4
12
 
5
13
  This is a major release which contains some breaking changes, primarily the removal of
@@ -72,7 +72,7 @@ prepare(VALUE self, VALUE db, VALUE sql)
72
72
  CHECK(db_ctx->db, status);
73
73
  timespecclear(&db_ctx->stmt_deadline);
74
74
 
75
- return rb_str_new2(tail);
75
+ return rb_utf8_str_new_cstr(tail);
76
76
  }
77
77
 
78
78
  /* call-seq: stmt.close
@@ -194,7 +194,7 @@ module SQLite3
194
194
  #
195
195
  # See also #execute2, #query, and #execute_batch for additional ways of
196
196
  # executing statements.
197
- def execute sql, bind_vars = [], *args, &block
197
+ def execute sql, bind_vars = [], &block
198
198
  prepare(sql) do |stmt|
199
199
  stmt.bind_params(bind_vars)
200
200
  stmt = build_result_set stmt
@@ -243,7 +243,7 @@ module SQLite3
243
243
  #
244
244
  # See also #execute_batch2 for additional ways of
245
245
  # executing statements.
246
- def execute_batch(sql, bind_vars = [], *args)
246
+ def execute_batch(sql, bind_vars = [])
247
247
  sql = sql.strip
248
248
  result = nil
249
249
  until sql.empty?
@@ -298,7 +298,7 @@ module SQLite3
298
298
  # returned, or you could have problems with locks on the table. If called
299
299
  # with a block, +close+ will be invoked implicitly when the block
300
300
  # terminates.
301
- def query(sql, bind_vars = [], *args)
301
+ def query(sql, bind_vars = [])
302
302
  result = prepare(sql).execute(bind_vars)
303
303
  if block_given?
304
304
  begin
@@ -1,3 +1,3 @@
1
1
  module SQLite3
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-04-17 00:00:00.000000000 Z
14
+ date: 2024-04-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mini_portile2
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.5.3
108
+ rubygems_version: 3.5.9
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org).