Skip to content

Commit bec5586

Browse files
committed
do not freeze to allow chaging defaults
1 parent 310c96b commit bec5586

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Manage data structure nesting depth in state object during generation. This
33
should reduce problems with to_json method definіtions that only have one
44
argument.
5+
* Some fixes in the state objects and additional tests.
56
2010-08-06 (1.4.4)
67
* Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
78
* Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and

lib/json/common.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ def generator=(generator) # :nodoc:
6363
end
6464
self.state = generator::State
6565
const_set :State, self.state
66-
const_set :SAFE_STATE_PROTOTYPE, State.new.freeze
66+
const_set :SAFE_STATE_PROTOTYPE, State.new
6767
const_set :FAST_STATE_PROTOTYPE, State.new(
6868
:indent => '',
6969
:space => '',
7070
:object_nl => "",
7171
:array_nl => "",
7272
:max_nesting => false
73-
).freeze
73+
)
7474
const_set :PRETTY_STATE_PROTOTYPE, State.new(
7575
:indent => ' ',
7676
:space => ' ',
7777
:object_nl => "\n",
7878
:array_nl => "\n"
79-
).freeze
79+
)
8080
end
8181

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

0 commit comments

Comments
 (0)