@@ -287,10 +287,6 @@ def test_states
287287 json = generate ( { 1 => 2 } , nil )
288288 assert_equal ( '{"1":2}' , json )
289289 s = JSON . state . new
290- assert s . check_circular?
291- assert_deprecated_warning ( /JSON::State/ ) do
292- assert s [ :check_circular? ]
293- end
294290 h = { 1 => 2 }
295291 h [ 3 ] = h
296292 assert_raise ( JSON ::NestingError ) { generate ( h ) }
@@ -299,10 +295,6 @@ def test_states
299295 a = [ 1 , 2 ]
300296 a << a
301297 assert_raise ( JSON ::NestingError ) { generate ( a , s ) }
302- assert s . check_circular?
303- assert_deprecated_warning ( /JSON::State/ ) do
304- assert s [ :check_circular? ]
305- end
306298 end
307299
308300 def test_falsy_state
@@ -578,35 +570,6 @@ def to_s
578570 bignum . class . define_method ( :to_s , original_to_s ) if original_to_s
579571 end
580572
581- def test_hash_likeness_set_symbol
582- assert_deprecated_warning ( /JSON::State/ ) do
583- state = JSON . state . new
584- assert_equal nil , state [ :foo ]
585- assert_equal nil . class , state [ :foo ] . class
586- assert_equal nil , state [ 'foo' ]
587- state [ :foo ] = :bar
588- assert_equal :bar , state [ :foo ]
589- assert_equal :bar , state [ 'foo' ]
590- state_hash = state . to_hash
591- assert_kind_of Hash , state_hash
592- assert_equal :bar , state_hash [ :foo ]
593- end
594- end
595-
596- def test_hash_likeness_set_string
597- assert_deprecated_warning ( /JSON::State/ ) do
598- state = JSON . state . new
599- assert_equal nil , state [ :foo ]
600- assert_equal nil , state [ 'foo' ]
601- state [ 'foo' ] = :bar
602- assert_equal :bar , state [ :foo ]
603- assert_equal :bar , state [ 'foo' ]
604- state_hash = state . to_hash
605- assert_kind_of Hash , state_hash
606- assert_equal :bar , state_hash [ :foo ]
607- end
608- end
609-
610573 def test_json_state_to_h_roundtrip
611574 state = JSON . state . new
612575 assert_equal state . to_h , JSON . state . new ( state . to_h ) . to_h
0 commit comments