From 8746e342bc3b45ec7d14df09d1288a9b53f225f0 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@22673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/http.rb b/lib/net/http.rb index 82e5ee6cc6..e3716b1bde 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 v1.2.3