Skip calling configure if there are no options - #664
Conversation
* Set all defaults in the constructor. * Order the instance variables in the same order as in #configure.
|
Maybe we could store the default state for Though obviously any global state seems bad and maybe the best is to deprecate |
|
Yeah, I toyed with this idea too last week, and I did however managed to avoid allocating the State object entirely in #662 so it's less of a problem now. |
Unfortunately because of
JSON.dump_default_optionsthis fast path won't apply forJSON.dump.I wish those values (
max_nesting: false, allow_nan: true) would be the default for all generate/dump-like methods and then they could be default in the State constructor.