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)
234234 def new
235235 klass = Net ::HTTP ::Proxy ( config ( 'proxy_host' ) , config ( 'proxy_port' ) )
236236 http = klass . new ( config ( 'host' ) , config ( 'port' ) )
237- http . set_debug_output logfile ( )
237+ http . set_debug_output logfile
238238 http
239239 end
240240
@@ -244,7 +244,7 @@ def config(key)
244244 end
245245
246246 def logfile
247- $DEBUG ? $ stderr : NullWriter . new
247+ $stderr if $DEBUG
248248 end
249249
250250 def setup
@@ -334,16 +334,6 @@ def parse_content_type(content_type)
334334 $test_net_http_data. force_encoding ( "ASCII-8BIT" )
335335 $test_net_http_data_type = 'application/octet-stream'
336336
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-
347337 def self . clean_http_proxy_env
348338 orig = {
349339 'http_proxy' => ENV [ 'http_proxy' ] ,
You can’t perform that action at this time.
0 commit comments