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 | 8ff99deda9addbacca355af2030ab6044fe1b076 (patch) | |
tree | aaf7de45ac3276125c97b9b3e249cb3adfeeada0 | |
parent | 0e585b37ec423a9eadf93b7d0333a4566ba11ff9 (diff) | |
download | ruby-8ff99deda9addbacca355af2030ab6044fe1b076.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
-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 |