From 201387496e057d4853520be9837b2a807c66cc48 Mon Sep 17 00:00:00 2001 From: Brendan Schwartz Date: Wed, 25 Mar 2009 15:14:52 -0400 Subject: 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(-) (limited to 'activeresource/lib/active_resource/connection.rb') diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index fb3fde59d6..99d4b8f2ca 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -134,7 +134,7 @@ module ActiveResource 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 -- cgit v1.2.3