summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-05-20 16:29:00 +0100
committerSteve Kemp <steve@steve.org.uk>2013-05-20 16:29:00 +0100
commit0dd4f3a2041b531c7d34a107ee93598f0f6dcbcf (patch)
tree1388b03f82218aef51748e6c5faa01b8be711c4b
parent57204630a6605e26ac2ed03d6d5886d51d6617c0 (diff)
Updated to test the kind of argument correctly.
-rw-r--r--lib/custodian/protocoltest/tcp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb
index e21e5a5..742de31 100644
--- a/lib/custodian/protocoltest/tcp.rb
+++ b/lib/custodian/protocoltest/tcp.rb
@@ -172,14 +172,14 @@ module Custodian
# test for banner
# regexp.
- if ( banner.class == "Regexp" )
+ if ( banner.kind_of? Regexp )
if ( ( !read.nil? ) && ( banner.match(read) ) )
return true
end
end
# string.
- if ( banner.class == "String" )
+ if ( banner.kind_of? String )
if ( ( !read.nil? ) && ( read =~ /#{banner}/i ) )
return true
end