@@ -79,8 +79,8 @@ def test_load
7979 assert_send_type "(_ToStr) -> 42" , JSON , :load , JsonToStr . new ( "42" )
8080 assert_send_type "(JsonToReadableIO) -> 42" , JSON , :load , JsonToReadableIO . new
8181 assert_send_type "(JsonRead) -> 42" , JSON , :load , JsonRead . new
82- assert_send_type "(String, Proc) -> 42" , JSON , :load , "42" , proc { }
83- assert_send_type "(String, Proc, Hash[untyped, untyped]) -> 42" , JSON , :load , "42" , proc { } , { alllow_nan : true }
82+ assert_send_type "(String, Proc) -> 42" , JSON , :load , "42" , proc { | a | a }
83+ assert_send_type "(String, Proc, Hash[untyped, untyped]) -> 42" , JSON , :load , "42" , proc { | a | a } , { alllow_nan : true }
8484 end
8585
8686 def test_load_file
@@ -128,10 +128,6 @@ def test_pretty_generate
128128 assert_send_type "(ToJson, indent: String) -> String" , JSON , :pretty_generate , ToJson . new , { indent : "\t " }
129129 end
130130
131- def test_recurse_proc
132- assert_send_type "(Integer) { (Integer) -> void } -> void" , JSON , :recurse_proc , 42 do |_i | end
133- end
134-
135131 def test_state
136132 assert_send_type "() -> singleton(JSON::Ext::Generator::State)" , JSON , :state
137133 end
@@ -168,15 +164,6 @@ def test_generate
168164 assert_send_type "(ToJson, indent: String) -> String" , MyJSON . new , :generate , ToJson . new , { indent : "\t " }
169165 end
170166
171- def test_load
172- assert_send_type "(String) -> 42" , MyJSON . new , :load , "42"
173- assert_send_type "(_ToStr) -> 42" , MyJSON . new , :load , JsonToStr . new ( "42" )
174- assert_send_type "(JsonToReadableIO) -> 42" , MyJSON . new , :load , JsonToReadableIO . new
175- assert_send_type "(JsonRead) -> 42" , MyJSON . new , :load , JsonRead . new
176- assert_send_type "(String, Proc) -> 42" , MyJSON . new , :load , "42" , proc { }
177- assert_send_type "(String, Proc, Hash[untyped, untyped]) -> 42" , MyJSON . new , :load , "42" , proc { } , { alllow_nan : true }
178- end
179-
180167 def test_parse
181168 assert_send_type "(String) -> 42" , MyJSON . new , :parse , "42"
182169 assert_send_type "(_ToStr) -> 42" , MyJSON . new , :parse , JsonToStr . new ( "42" )
@@ -194,10 +181,6 @@ def test_pretty_generate
194181 assert_send_type "(ToJson, indent: String) -> String" , MyJSON . new , :pretty_generate , ToJson . new , { indent : "\t " }
195182 end
196183
197- def test_recurse_proc
198- assert_send_type "(Integer) { (Integer) -> void } -> void" , MyJSON . new , :recurse_proc , 42 do |_i | end
199- end
200-
201184 def test_to_json_with_object
202185 assert_send_type "() -> String" , Object . new , :to_json
203186 assert_send_type "(JSON::State) -> String" , Object . new , :to_json , JSON ::State . new
0 commit comments