From e1d27eedceea46531d11c03c1e1e61ba15a5fdf2 Mon Sep 17 00:00:00 2001 From: Brendan Schwartz Date: Wed, 25 Mar 2009 15:14:52 -0400 Subject: [PATCH] Ruby 1.9 compat: fix for SSL in Active Resource [#1272 state:committed] Signed-off-by: Jeremy Kemper --- activeresource/lib/active_resource/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index 85103b53c5320..943c9ef1e3fa5 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -188,7 +188,7 @@ def handle_response(response) def http http = Net::HTTP.new(@site.host, @site.port) http.use_ssl = @site.is_a?(URI::HTTPS) - http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl + http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? http.read_timeout = @timeout if @timeout # If timeout is not set, the default Net::HTTP timeout (60s) is used. http end