File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ def start(&block)
234
234
def new
235
235
klass = Net ::HTTP ::Proxy ( config ( 'proxy_host' ) , config ( 'proxy_port' ) )
236
236
http = klass . new ( config ( 'host' ) , config ( 'port' ) )
237
- http . set_debug_output logfile ( )
237
+ http . set_debug_output logfile
238
238
http
239
239
end
240
240
@@ -244,7 +244,7 @@ def config(key)
244
244
end
245
245
246
246
def logfile
247
- $DEBUG ? $ stderr : NullWriter . new
247
+ $stderr if $DEBUG
248
248
end
249
249
250
250
def setup
@@ -334,16 +334,6 @@ def parse_content_type(content_type)
334
334
$test_net_http_data. force_encoding ( "ASCII-8BIT" )
335
335
$test_net_http_data_type = 'application/octet-stream'
336
336
337
- class NullWriter
338
- def <<( _s ) ; end
339
-
340
- def puts ( *_args ) ; end
341
-
342
- def print ( *_args ) ; end
343
-
344
- def printf ( *_args ) ; end
345
- end
346
-
347
337
def self . clean_http_proxy_env
348
338
orig = {
349
339
'http_proxy' => ENV [ 'http_proxy' ] ,
You can’t perform that action at this time.
0 commit comments