json_pure 2.7.4 → 2.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/lib/json/common.rb +6 -1
- data/lib/json/pure/generator.rb +7 -7
- data/lib/json/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 859e40f5bfa7da73a90576204b5c49d6f42b9f2ca903239ecea54ec7a781fdc4
|
4
|
+
data.tar.gz: e38d6c5db98da6416dbb75746621aa7b7d3bd7e8f8c62042eef6e15e9ecf5f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3569ecd696382dbf173955fcfa9f49f3452a2d8b45bf29dcad6cd22ee0ac67bc8a6359ca548ae5367ca93cd02af4515b7e35ac213b5989658ad3133815fbece3
|
7
|
+
data.tar.gz: 6a23ba9fba6317c04f58c0d03a81b9d85aa8c2f5f8ec585cdfe9b6e97dc5f7994cfb3ef52749b4575857057f1cf803fb29936571f0d20f7b99e17828fa7d954b
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
### 2024-10-25 (2.7.5)
|
4
|
+
|
5
|
+
* Fix a memory leak when `#to_json` methods raise an exception.
|
6
|
+
* Gracefully handle formatting configs being set to `nil` instead of `""`.
|
7
|
+
* Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.
|
8
|
+
|
3
9
|
### 2024-10-25 (2.7.4)
|
4
10
|
|
5
11
|
* Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
|
data/lib/json/common.rb
CHANGED
@@ -219,7 +219,12 @@ module JSON
|
|
219
219
|
if opts.nil?
|
220
220
|
Parser.new(source).parse
|
221
221
|
else
|
222
|
-
|
222
|
+
# NB: The ** shouldn't be required, but we have to deal with
|
223
|
+
# different versions of the `json` and `json_pure` gems being
|
224
|
+
# loaded concurrently.
|
225
|
+
# Prior to 2.7.3, `JSON::Ext::Parser` would only take kwargs.
|
226
|
+
# Ref: https://github.com/ruby/json/issues/650
|
227
|
+
Parser.new(source, **opts).parse
|
223
228
|
end
|
224
229
|
end
|
225
230
|
|
data/lib/json/pure/generator.rb
CHANGED
@@ -239,13 +239,13 @@ module JSON
|
|
239
239
|
end
|
240
240
|
|
241
241
|
# NOTE: If adding new instance variables here, check whether #generate should check them for #generate_json
|
242
|
-
@indent = opts[:indent] if opts.key?(:indent)
|
243
|
-
@space = opts[:space] if opts.key?(:space)
|
244
|
-
@space_before = opts[:space_before] if opts.key?(:space_before)
|
245
|
-
@object_nl = opts[:object_nl] if opts.key?(:object_nl)
|
246
|
-
@array_nl = opts[:array_nl] if opts.key?(:array_nl)
|
247
|
-
@allow_nan = !!opts[:allow_nan]
|
248
|
-
@ascii_only = opts[:ascii_only]
|
242
|
+
@indent = opts[:indent] || '' if opts.key?(:indent)
|
243
|
+
@space = opts[:space] || '' if opts.key?(:space)
|
244
|
+
@space_before = opts[:space_before] || '' if opts.key?(:space_before)
|
245
|
+
@object_nl = opts[:object_nl] || '' if opts.key?(:object_nl)
|
246
|
+
@array_nl = opts[:array_nl] || '' if opts.key?(:array_nl)
|
247
|
+
@allow_nan = !!opts[:allow_nan] if opts.key?(:allow_nan)
|
248
|
+
@ascii_only = opts[:ascii_only] if opts.key?(:ascii_only)
|
249
249
|
@depth = opts[:depth] || 0
|
250
250
|
@buffer_initial_length ||= opts[:buffer_initial_length]
|
251
251
|
|
data/lib/json/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a JSON implementation in pure Ruby.
|
14
14
|
email: flori@ping.de
|