legion-json 1.3.2 → 1.3.3

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: 84f736112017315b1ffb72f9ecced07fa994535232a413f1d620d2c73df1eace
4
- data.tar.gz: 87a2927e1914bd50069fa67c01bc858df9ca1524ea0e3eb545218056f690e9d0
3
+ metadata.gz: 146255daac57d06fdfd426b87e9cb988c9f35c68747aea6c655321c1bc3ce659
4
+ data.tar.gz: 18032881bc265b5620501287996dca66f973afe189fe5ac083a80768e6cd10f5
5
5
  SHA512:
6
- metadata.gz: 97a1e4a75f2d3996dba14968b8bd96e06b62508d1d3f06c2a971bf442c36513156757336a50d2ae0c140079c81cc4a71266999777639c47079041df56aab38e3
7
- data.tar.gz: 9ef6d473edc89d77a3aebb65b59e357ec1e8f1c94b4af31c9d4a1944b7566a3fd57df5a405c25a66c2faea58301ce2b327c9bb653a46274764db5d563a56cf17
6
+ metadata.gz: a7419675fbc1fece2e03c96ae8a59644ea14fa875860602b158c0a4ee018d07b900b6473a9fd22c760419da2974c54dafb06c757403a0e384cbe48425d77599f
7
+ data.tar.gz: 6df0e9811b73fc81cbfcb8ea5a49c8bd16b448f4df964f96b11292f2a2bc5033f6882f1fedcf2d7ac684151c1689e8f57d525828fdb83f5212802b8bfdfcacab
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Legion::JSON
2
2
 
3
+ ## [1.3.3] - 2026-04-14
4
+
5
+ ### Fixed
6
+ - `Legion::JSON.dump` with `pretty: false` (the default) produced pretty-printed output when Oj adapter was active. Oj/MultiJson treats any explicit `pretty:` keyword (even `false`) as truthy. Fix: only pass `pretty: true` when requested; omit the keyword entirely otherwise.
7
+
3
8
  ## [1.3.2] - 2026-04-08
4
9
 
5
10
  ### Fixed
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Json
5
- VERSION = '1.3.2'
5
+ VERSION = '1.3.3'
6
6
  end
7
7
  end
data/lib/legion/json.rb CHANGED
@@ -23,7 +23,8 @@ module Legion
23
23
 
24
24
  def dump(object = nil, pretty: false, **kwargs)
25
25
  data = object.nil? ? kwargs : object
26
- parser.dump(data, pretty: pretty)
26
+ # Only pass pretty: when true — Oj/MultiJson treats any explicit pretty: (even false) as truthy
27
+ pretty ? parser.dump(data, pretty: true) : parser.dump(data)
27
28
  end
28
29
  module_function :dump
29
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity