summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/ssl.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 12:52:08 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 12:52:08 +0000
commit262c7d9360b23cb06d60f0b0692379555e691274 (patch)
tree4d8258b06c38bf1467e773b61bbb1ab57780e945 /lib/custodian/protocoltest/ssl.rb
parent2c1d04d0042994f65816f592e50709637795f31f (diff)
Avoid redundent ".to_s" methods.
These are not required if the argument is string already, or has a _to_s method which will be automatically invoked by magic.
Diffstat (limited to 'lib/custodian/protocoltest/ssl.rb')
-rw-r--r--lib/custodian/protocoltest/ssl.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb
index ab57dff..18da9f1 100644
--- a/lib/custodian/protocoltest/ssl.rb
+++ b/lib/custodian/protocoltest/ssl.rb
@@ -178,10 +178,10 @@ class SSLCheck
ctx = OpenSSL::SSL::SSLContext.new(:SSLv3_client)
retry
end
- self.errors << verbose("*Caught #{err.class}* (#{err.to_s}) when connecting to #{uri.host}:#{uri.port}")
+ self.errors << verbose("*Caught #{err.class}* (#{err}) when connecting to #{uri.host}:#{uri.port}")
rescue StandardError, Timeout::Error => err
- self.errors << verbose("*Caught #{err.class}* (#{err.to_s}) when connecting to #{uri.host}:#{uri.port}")
+ self.errors << verbose("*Caught #{err.class}* (#{err}) when connecting to #{uri.host}:#{uri.port}")
ensure
s.close if s.respond_to?(:close) and !s.closed?
end
@@ -227,7 +227,7 @@ class SSLCheck
#
return true
rescue StandardError, Timeout::Error => err
- self.errors << verbose("*Caught #{err.class}* (#{err.to_s}) when connecting to #{uri.host}:#{uri.port} using SSLv3")
+ self.errors << verbose("*Caught #{err.class}* (#{err}) when connecting to #{uri.host}:#{uri.port} using SSLv3")
ensure
s.close if s.respond_to?(:close) and !s.closed?
end
@@ -313,7 +313,7 @@ class SSLCheck
# including any bundle that has been uploaded.
#
elsif self.certificate_store.is_a?(OpenSSL::X509::Store) and self.certificate_store.verify(self.certificate)
- verbose "Certificate signed by #{self.certificate.issuer.to_s}"
+ verbose "Certificate signed by #{self.certificate.issuer}"
return true
#