ruby-changes:11078
From: akr <ko1@a...>
Date: Sat, 28 Feb 2009 16:20:13 +0900 (JST)
Subject: [ruby-changes:11078] Ruby:r22673 (trunk): * lib/net/http.rb: suppress warnings of non-existing instance variable
akr 2009-02-28 16:19:55 +0900 (Sat, 28 Feb 2009) New Revision: 22673 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22673 Log: * lib/net/http.rb: suppress warnings of non-existing instance variable access for SSL. Modified files: trunk/ChangeLog trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 22672) +++ ChangeLog (revision 22673) @@ -1,3 +1,8 @@ +Sat Feb 28 16:18:39 2009 Tanaka Akira <akr@f...> + + * lib/net/http.rb: suppress warnings of non-existing instance variable + access for SSL. + Sat Feb 28 14:50:47 2009 Tanaka Akira <akr@f...> * ext/socket/lib/socket.rb (BasicSocket#connect_address): returns ::1 Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 22672) +++ lib/net/http.rb (revision 22673) @@ -582,8 +582,11 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/