json 2.7.3-java → 2.7.4-java

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: c8fe928aafb46cad16de5658fa5d7b26fd17d8aba321cdaad20890317fbe91f8
4
- data.tar.gz: 74f783d3d23b8b8f1ad66f42f41f8f59f98a85ab809b08954975c4abd9f622fe
3
+ metadata.gz: f61f1f7cf84e855d4f7a7b56d7a1ec807bf1f6f0ba418984b94191bbd15a8db1
4
+ data.tar.gz: b81dba38d7eb8dc893cb8107dcc42e829b9b21d0595bdd660f3203db607522cd
5
5
  SHA512:
6
- metadata.gz: 02c11c64ff4a7ccabdbd86150a90e2528f7c47715eeec844a85f68a8576632845b5527b7dc9ca834751a5dd016bf12b45bac52b00844c76c44aec296e96373fa
7
- data.tar.gz: 9dd119a077eb1dd8848ccdeb415ce1098e916001b54e2f7f30cba706a9f88b10afcc20e6f172d19f35c97f23888c77fbdac85cc4260defecda9e8814d319154b
6
+ metadata.gz: 97ef406dd7d1506134ee9d87d7eec34cbf5377d2485ffb975d3262731bb65ea3370098cd395df07bd1ce96a0adad7b79f312666142f9216b5c31899df640768c
7
+ data.tar.gz: aa59a3978e28cda2f8a62b7b51dc3a8dbb39b4dc68a32789f457824e3fb749326635536ff2dcb30b8a70b6591d08bfb041d2ca4e93446e3e4e77a2a441ee0783
data/CHANGES.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changes
2
2
 
3
+ ### 2024-10-25 (2.7.4)
4
+
5
+ * Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
6
+ This bug would cause some gems with native extension to fail during compilation.
7
+ * Workaround different versions of `json` and `json_pure` being loaded (not officially supported).
8
+ * Make `json_pure` Ractor compatible.
9
+
3
10
  ### 2024-10-24 (2.7.3)
4
11
 
5
12
  * Numerous performance optimizations in `JSON.generate` and `JSON.dump` (up to 2 times faster).
data/lib/json/ext.rb CHANGED
@@ -15,9 +15,6 @@ module JSON
15
15
  else
16
16
  require 'json/ext/parser'
17
17
  require 'json/ext/generator'
18
- unless RUBY_ENGINE == 'jruby'
19
- require 'json/ext/generator/state'
20
- end
21
18
  $DEBUG and warn "Using Ext extension for JSON."
22
19
  JSON.parser = Parser
23
20
  JSON.generator = Generator
@@ -148,25 +148,25 @@ module JSON
148
148
  end
149
149
 
150
150
  # Unescape characters in strings.
151
- UNESCAPE_MAP = Hash.new { |h, k| h[k] = k.chr }
152
- UNESCAPE_MAP.update({
153
- ?" => '"',
154
- ?\\ => '\\',
155
- ?/ => '/',
156
- ?b => "\b",
157
- ?f => "\f",
158
- ?n => "\n",
159
- ?r => "\r",
160
- ?t => "\t",
161
- ?u => nil,
162
- })
151
+ UNESCAPE_MAP = {
152
+ '"' => '"',
153
+ '\\' => '\\',
154
+ '/' => '/',
155
+ 'b' => "\b",
156
+ 'f' => "\f",
157
+ 'n' => "\n",
158
+ 'r' => "\r",
159
+ 't' => "\t",
160
+ 'u' => nil,
161
+ }.freeze
163
162
 
164
163
  STR_UMINUS = ''.respond_to?(:-@)
165
164
  def parse_string
166
165
  if scan(STRING)
167
166
  return '' if self[1].empty?
168
- string = self[1].gsub(%r((?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff]))n) do |c|
169
- if u = UNESCAPE_MAP[$&[1]]
167
+ string = self[1].gsub(%r{(?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff])}n) do |c|
168
+ k = $&[1]
169
+ if u = UNESCAPE_MAP.fetch(k) { k.chr }
170
170
  u
171
171
  else # \uXXXX
172
172
  bytes = ''.b
data/lib/json/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSON
4
- VERSION = '2.7.3'
4
+ VERSION = '2.7.4'
5
5
  end
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.7.3
4
+ version: 2.7.4
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A JSON implementation as a JRuby extension.
14
14
  email: dev+ruby@mernen.com