diff options
author | Florian Frank <flori@ping.de> | 2010-03-13 21:11:58 +0100 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2010-03-13 21:11:58 +0100 |
commit | c3e8dd92f04b010366e4d7152c83c7486af93e1e (patch) | |
tree | 883b600b03e7a5788f50fe4f71b4fe9f88f7ef9f /tests/test_json_generate.rb | |
parent | 92b013ce8e0a5c3caefd15f450409ed69aa539f2 (diff) | |
parent | 3db50701a4a71e49709c63483d2ba4b5a408373b (diff) | |
download | json-c3e8dd92f04b010366e4d7152c83c7486af93e1e.tar.gz |
Merge commit 'v1.2.3'
Merged in some additional features from the v1.2 branch.
Diffstat (limited to 'tests/test_json_generate.rb')
-rwxr-xr-x | tests/test_json_generate.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_json_generate.rb b/tests/test_json_generate.rb index d57602c..26ca1ad 100755 --- a/tests/test_json_generate.rb +++ b/tests/test_json_generate.rb @@ -88,6 +88,8 @@ EOT json = generate({1=>2}, nil) assert_equal('{"1":2}', json) s = JSON.state.new + assert s.check_circular? + assert s[:check_circular?] h = { 1=>2 } h[3] = h assert_raises(JSON::NestingError) { generate(h) } @@ -96,6 +98,8 @@ EOT a = [ 1, 2 ] a << a assert_raises(JSON::NestingError) { generate(a, s) } + assert s.check_circular? + assert s[:check_circular?] end def test_allow_nan |