diff --git a/ChangeLog b/ChangeLog index 1074feaf03..5435baac62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 28 16:18:39 2009 Tanaka Akira + + * lib/net/http.rb: suppress warnings of non-existing instance variable + access for SSL. + Sat Feb 28 14:50:47 2009 Tanaka Akira * ext/socket/lib/socket.rb (BasicSocket#connect_address): returns ::1 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