Skip to content

Commit

Permalink
do not freeze to allow chaging defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
flori committed Aug 6, 2010
1 parent 310c96b commit bec5586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Manage data structure nesting depth in state object during generation. This
should reduce problems with to_json method definіtions that only have one
argument.
* Some fixes in the state objects and additional tests.
2010-08-06 (1.4.4)
* Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
* Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and
Expand Down
6 changes: 3 additions & 3 deletions lib/json/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ def generator=(generator) # :nodoc:
end
self.state = generator::State
const_set :State, self.state
const_set :SAFE_STATE_PROTOTYPE, State.new.freeze
const_set :SAFE_STATE_PROTOTYPE, State.new
const_set :FAST_STATE_PROTOTYPE, State.new(
:indent => '',
:space => '',
:object_nl => "",
:array_nl => "",
:max_nesting => false
).freeze
)
const_set :PRETTY_STATE_PROTOTYPE, State.new(
:indent => ' ',
:space => ' ',
:object_nl => "\n",
:array_nl => "\n"
).freeze
)
end

# Returns the JSON generator modul, that is used by JSON. This might be
Expand Down

0 comments on commit bec5586

Please sign in to comment.