We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3226913 commit 3d741e8Copy full SHA for 3d741e8
CHANGES.md
@@ -2,6 +2,8 @@
2
3
### Unreleased
4
5
+* Fix for JSON.pretty_generate to use passed state object's generate instead of state class as the required parameters aren't available.
6
+
7
### 2025-05-12 (2.12.0)
8
9
* Improve floating point generation to not use scientific notation as much.
lib/json/common.rb
@@ -490,7 +490,7 @@ def fast_generate(obj, opts = nil)
490
# }
491
#
492
def pretty_generate(obj, opts = nil)
493
- return state.generate(obj) if State === opts
+ return opts.generate(obj) if State === opts
494
495
options = PRETTY_GENERATE_OPTIONS
496
0 commit comments