json 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aeae3369690d7e0350db826e6971ad2dec6c26d8cae85f48fa65eb951bbb07f2
4
- data.tar.gz: e7656787a08dc35ebbf8cfc74293474845f66ddf78d97f9714a0621187c666a7
3
+ metadata.gz: 747a457b1988cb2f8b166b6e0c228a3dca50b90a120a9128f815c4c18fb9f450
4
+ data.tar.gz: cc3c446db01177c9f7fbc6409d19e69bebce3845c77a7e8a3542c783a728d8b2
5
5
  SHA512:
6
- metadata.gz: 91c481b04c5c1468e38cd5c58d8272375b4bb5963407979763ba56d1c252364a30823a2fef4dbfd41ba63e0c41403fd78fa1754d3daac068a548d5fc496fb410
7
- data.tar.gz: 5f5ed1d4d106f85bc5dee473cd7017e237a3d53b53e85c0e436421cf138caff3280b4b20597317ebb163c33447eec5f0d37adaaf0f1666a1e86f3180924bcf06
6
+ metadata.gz: ea235083ce6d28a891ca4b583a7cb36641e736bc776a7039ff59c919e21e5d3eae4b2baf254dc190de003cccc62a1e7a03ada668c97f3226c154d1e76a35b307
7
+ data.tar.gz: 4818eaff0e54ef1402253bdca221c1262257314131733ac678338c8d8c8d447052dcf11205e309573b32ea9354717d3c485011739c8a7ab4c12af3391d7e2500
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ### 2025-04-24 (2.11.2)
4
+
5
+ * Add back `JSON::PRETTY_STATE_PROTOTYPE`. This constant was private API but is used by popular gems like `multi_json`.
6
+ It now emits a deprecation warning.
7
+
3
8
  ### 2025-04-24 (2.11.1)
4
9
 
5
10
  * Add back `JSON.restore`, `JSON.unparse`, `JSON.fast_unparse` and `JSON.pretty_unparse`.
data/lib/json/common.rb CHANGED
@@ -961,6 +961,24 @@ module JSON
961
961
  load(...)
962
962
  end
963
963
  module_function :restore
964
+
965
+ class << self
966
+ private
967
+
968
+ def const_missing(const_name)
969
+ case const_name
970
+ when :PRETTY_STATE_PROTOTYPE
971
+ if RUBY_VERSION >= "3.0"
972
+ warn "JSON::PRETTY_STATE_PROTOTYPE is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1, category: :deprecated
973
+ else
974
+ warn "JSON::PRETTY_STATE_PROTOTYPE is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1
975
+ end
976
+ state.new(PRETTY_GENERATE_OPTIONS)
977
+ else
978
+ super
979
+ end
980
+ end
981
+ end
964
982
  # :startdoc:
965
983
 
966
984
  # JSON::Coder holds a parser and generator configuration.
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.11.1'
4
+ VERSION = '2.11.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank