From 51ee08fd7128639ecb82997612b028ba94ba8c3d Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 4 Dec 2012 01:01:37 +0000 Subject: [PATCH] Suppress warning: uninitialized variable [ruby-core:50470] [Bug #7494] Conditional operator is required to return true or false. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/http.rb b/lib/net/http.rb index d6a668e6ff..87cebb4a0c 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -984,7 +984,7 @@ module Net #:nodoc: class << HTTP # returns true if self is a class which was created by HTTP::Proxy. def proxy_class? - @is_proxy_class + defined?(@is_proxy_class) ? @is_proxy_class : false end # Address of proxy host. If Net::HTTP does not use a proxy, nil.