Skip to content

Commit 2013874

Browse files
bschwartzjeremy
authored andcommitted
Ruby 1.9 compat: fix for SSL in Active Resource
[rails#1272 state:committed] Signed-off-by: Jeremy Kemper <[email protected]>
1 parent 06afa48 commit 2013874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activeresource/lib/active_resource/connection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def handle_response(response)
134134
def http
135135
http = Net::HTTP.new(@site.host, @site.port)
136136
http.use_ssl = @site.is_a?(URI::HTTPS)
137-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl
137+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl?
138138
http.read_timeout = @timeout if @timeout # If timeout is not set, the default Net::HTTP timeout (60s) is used.
139139
http
140140
end

0 commit comments

Comments
 (0)