From 8ff99deda9addbacca355af2030ab6044fe1b076 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 28 Jun 2016 06:19:58 +0000 Subject: Use conditional operator * lib/net/http.rb (Net::HTTP#proxy): use conditional operator to get rid of confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/net/http.rb') diff --git a/lib/net/http.rb b/lib/net/http.rb index 873d731a3a..326d737692 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1039,11 +1039,7 @@ module Net #:nodoc: # True if requests for this connection will be proxied def proxy? - !!if @proxy_from_env then - proxy_uri - else - @proxy_address - end + !!(@proxy_from_env ? proxy_uri : @proxy_address) end # True if the proxy for this connection is determined from the environment -- cgit v1.2.3