File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -216,12 +216,6 @@ def test_unsafe_load_with_proc
216216 assert_equal expected , visited
217217 end
218218
219- def test_unsafe_load_with_options
220- json = '{ "foo": NaN }'
221- assert JSON . unsafe_load ( json , nil , :allow_nan => true ) [ 'foo' ] . nan?
222- assert JSON . unsafe_load ( json , :allow_nan => true ) [ 'foo' ] . nan?
223- end
224-
225219 def test_unsafe_load_default_options
226220 too_deep = '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]'
227221 assert JSON . unsafe_load ( too_deep , nil ) . is_a? ( Array )
@@ -237,6 +231,7 @@ def test_unsafe_load_with_options
237231 assert_raise ( JSON ::ParserError ) { JSON . unsafe_load ( nan_json , nil , :allow_nan => false ) [ 'foo' ] . nan? }
238232 # make sure it still uses the defaults when something is provided
239233 assert JSON . unsafe_load ( nan_json , nil , :allow_blank => true ) [ 'foo' ] . nan?
234+ assert JSON . unsafe_load ( nan_json , :allow_nan => true ) [ 'foo' ] . nan?
240235 end
241236
242237 def test_unsafe_load_null
You can’t perform that action at this time.
0 commit comments