summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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