Permalink
Browse files

Fix crash for ssl_version method in Ruby 1.8.7. This method is only a…

…vailable in 1.9.x
  • Loading branch information...
jbrowning committed Jan 15, 2013
1 parent 48a036b commit ca12cef788cd14b109723de8144614c89c33de6d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/madmimi.rb
View
@@ -216,7 +216,7 @@ def do_request(path, req_type = :get, options = {}, transactional = false)
if transactional == true
http = Net::HTTP.new(BASE_URL, 443)
http.use_ssl = true
- http.ssl_version = :SSLv3
+ http.ssl_version = "SSLv3" if http.respond_to?(:ssl_version)
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
else
http = Net::HTTP.new(BASE_URL, 80)

0 comments on commit ca12cef

Please sign in to comment.