summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 09:11:05 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 09:11:05 +0000
commit15f9e16c5baba9dd0f1b04449a06b4c838111775 (patch)
tree3e4260e27ab48fadc92b57cca4ca33fcc483e31e /lib
parent5328fa259ba6a30ca06577925e8cab0aa824ce5a (diff)
* lib/open-uri.rb (OpenURI.open_http): refactoring of r48941.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/open-uri.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index 71f1eb7..e49a09b 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -295,8 +295,7 @@ module OpenURI
http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER
store = OpenSSL::X509::Store.new
if options[:ssl_ca_cert]
- certs = options[:ssl_ca_cert].is_a?(Array) ? options[:ssl_ca_cert] : [options[:ssl_ca_cert]]
- certs.each do |cert|
+ Array(options[:ssl_ca_cert]).each do |cert|
if File.directory? cert
store.add_path cert
else