Skip to content

Commit 6d3b3ac

Browse files
authored
Merge pull request #664 from eregon/skip-configure-if-no-options
Skip calling configure if there are no options
2 parents 90e6df3 + 3eef3d3 commit 6d3b3ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/json/pure/generator.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@ def initialize(opts = nil)
142142
@array_nl = ''
143143
@allow_nan = false
144144
@ascii_only = false
145-
@script_safe = false
146-
@strict = false
145+
@depth = 0
147146
@buffer_initial_length = 1024
148-
configure(opts || {})
147+
@script_safe = false
148+
@strict = false
149+
@max_nesting = 100
150+
configure(opts) if opts
149151
end
150152

151153
# This string is used to indent levels in the JSON text.

0 commit comments

Comments
 (0)