diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index 39f4152ef3..6da7175f13 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -234,7 +234,7 @@ module TestNetHTTPUtils def new klass = Net::HTTP::Proxy(config('proxy_host'), config('proxy_port')) http = klass.new(config('host'), config('port')) - http.set_debug_output logfile() + http.set_debug_output logfile http end @@ -244,7 +244,7 @@ module TestNetHTTPUtils end def logfile - $DEBUG ? $stderr : NullWriter.new + $stderr if $DEBUG end def setup @@ -334,16 +334,6 @@ module TestNetHTTPUtils $test_net_http_data.force_encoding("ASCII-8BIT") $test_net_http_data_type = 'application/octet-stream' - class NullWriter - def <<(_s); end - - def puts(*_args); end - - def print(*_args); end - - def printf(*_args); end - end - def self.clean_http_proxy_env orig = { 'http_proxy' => ENV['http_proxy'],