ruby-changes:43445
From: nobu <ko1@a...>
Date: Tue, 28 Jun 2016 15:20:04 +0900 (JST)
Subject: [ruby-changes:43445] nobu:r55519 (trunk): Use conditional operator
nobu 2016-06-28 15:19:58 +0900 (Tue, 28 Jun 2016) New Revision: 55519 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55519 Log: Use conditional operator * lib/net/http.rb (Net::HTTP#proxy): use conditional operator to get rid of confusing ruby-mode.el. Modified files: trunk/lib/net/http.rb Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 55518) +++ lib/net/http.rb (revision 55519) @@ -1039,11 +1039,7 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1039 # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/