Permalink
Browse files

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
  • Loading branch information...
1 parent f68ab20 commit 51ee08fd7128639ecb82997612b028ba94ba8c3d @nurse nurse committed Dec 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/net/http.rb
View
@@ -984,7 +984,7 @@ def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil)
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.

0 comments on commit 51ee08f

Please sign in to comment.