We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f4551f commit 9d32cf4Copy full SHA for 9d32cf4
test/json/json_generator_test.rb
@@ -915,4 +915,13 @@ def test_frozen
915
end
916
917
918
+
919
+ # The case when the State is frozen is tested in JSONCoderTest#test_nesting_recovery
920
+ def test_nesting_recovery
921
+ state = JSON::State.new
922
+ ary = []
923
+ ary << ary
924
+ assert_raise(JSON::NestingError) { state.generate_new(ary) }
925
+ assert_equal '{"a":1}', state.generate({ a: 1 })
926
+ end
927
0 commit comments