From 47da798d84f2eceea4dcda61c62180505899d9c1 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 28 Feb 2009 07:19:55 +0000 Subject: * lib/net/http.rb: suppress warnings of non-existing instance variable access for SSL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http.rb b/lib/net/http.rb index 82e5ee6cc..e3716b1bd 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -582,8 +582,11 @@ module Net #:nodoc: D "opened" if use_ssl? ssl_parameters = Hash.new + iv_list = instance_variables SSL_ATTRIBUTES.each do |name| - if value = instance_variable_get("@#{name}") + ivname = "@#{name}".intern + if iv_list.include?(ivname) and + value = instance_variable_get(ivname) ssl_parameters[name] = value end end -- cgit