diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-28 06:19:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-28 06:19:58 +0000 |
commit | 1a08b2be8e3e8d36dcee7640b57ba7635f207227 (patch) | |
tree | aaf7de45ac3276125c97b9b3e249cb3adfeeada0 /lib/net | |
parent | 9529070634a6aaf930ec2958a1c5f42cbccedb97 (diff) | |
download | ruby-1a08b2be8e3e8d36dcee7640b57ba7635f207227.tar.gz |
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
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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 |