json 2.6.1 → 2.6.2

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: 28754306f4a5a73cb18a8a02a519b8efcfb84ff59c2cece37ba9c37dd157c29c
4
- data.tar.gz: 3bdeda4996bde6e7f28e55cfd47dd278d5f65ed709ac5ec444da46a0fa878621
3
+ metadata.gz: 21e09bba5bfe89e923363872b46bfb0ee800ff01e039e36b662008c85983983f
4
+ data.tar.gz: 2f319b945dd9f7510ce8dac412ab6d69f289942278cd298728af1cecb3b329c0
5
5
  SHA512:
6
- metadata.gz: 2b760312c30f7a69b57abc61f19ca2ca06a7d592d2dd5f51fe8d06c42763a74f91ef5474c339c4c8f8e6a1e29de1886e5e3e63ecc474ed205a9a1a49c4c1014c
7
- data.tar.gz: 54a87c4287805b5af55c34578623d79b33f7a1c04ed739e3265423153a1e95952bc888adc5c0613c6e6ba48df96aa995eff9e74cc715491200db61707d3aa356
6
+ metadata.gz: f7edf79e46c4a5e1b353f1463cad92af3198c8983247e9bb04751dd98ee714040455ebff17f03fe2b1a7928992885914d192e8b509673a26b47c8966822cb450
7
+ data.tar.gz: 5b086c18aac3d99ac1ef2ec5bdf66af841ba5dd6bc3a85e1e8e65ccb086458902b4a49fdb08a8acce978a46c13b82c23dc724450869f02898d6374d79750aca6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.1
1
+ 2.6.2
@@ -2363,9 +2363,17 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
2363
2363
  char buf[4];
2364
2364
 
2365
2365
  if (bufferSize > MAX_STACK_BUFFER_SIZE) {
2366
+ # ifdef HAVE_RB_ENC_INTERNED_STR
2367
+ bufferStart = buffer = ALLOC_N(char, bufferSize ? bufferSize : 1);
2368
+ # else
2366
2369
  bufferStart = buffer = ALLOC_N(char, bufferSize);
2370
+ # endif
2367
2371
  } else {
2372
+ # ifdef HAVE_RB_ENC_INTERNED_STR
2373
+ bufferStart = buffer = ALLOCA_N(char, bufferSize ? bufferSize : 1);
2374
+ # else
2368
2375
  bufferStart = buffer = ALLOCA_N(char, bufferSize);
2376
+ # endif
2369
2377
  }
2370
2378
 
2371
2379
  while (pe < stringEnd) {
@@ -2950,6 +2958,7 @@ static const char MAYBE_UNUSED(_JSON_nfa_pop_trans)[] = {
2950
2958
  *
2951
2959
  * Parses the current JSON text _source_ and returns the complete data
2952
2960
  * structure as a result.
2961
+ * It raises JSON::ParseError if fail to parse.
2953
2962
  */
2954
2963
  static VALUE cParser_parse(VALUE self)
2955
2964
  {
@@ -462,9 +462,17 @@ static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int
462
462
  char buf[4];
463
463
 
464
464
  if (bufferSize > MAX_STACK_BUFFER_SIZE) {
465
+ # ifdef HAVE_RB_ENC_INTERNED_STR
466
+ bufferStart = buffer = ALLOC_N(char, bufferSize ? bufferSize : 1);
467
+ # else
465
468
  bufferStart = buffer = ALLOC_N(char, bufferSize);
469
+ # endif
466
470
  } else {
471
+ # ifdef HAVE_RB_ENC_INTERNED_STR
472
+ bufferStart = buffer = ALLOCA_N(char, bufferSize ? bufferSize : 1);
473
+ # else
467
474
  bufferStart = buffer = ALLOCA_N(char, bufferSize);
475
+ # endif
468
476
  }
469
477
 
470
478
  while (pe < stringEnd) {
@@ -839,6 +847,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
839
847
  *
840
848
  * Parses the current JSON text _source_ and returns the complete data
841
849
  * structure as a result.
850
+ * It raises JSON::ParseError if fail to parse.
842
851
  */
843
852
  static VALUE cParser_parse(VALUE self)
844
853
  {
data/lib/json/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
  module JSON
3
3
  # JSON version
4
- VERSION = '2.6.1'
4
+ VERSION = '2.6.2'
5
5
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
6
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
7
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-24 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a JSON implementation as a Ruby extension in C.
14
14
  email: flori@ping.de
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.3.0.dev
90
+ rubygems_version: 3.3.13
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: JSON Implementation for Ruby