summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest
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
commit3938e2a6d94d3af7d598b3e5339b2d182325a13b (patch)
tree3a3a37eaf667d56f6d32ca8d1c1a41a975cb6e25 /lib/custodian/protocoltest
parentc77b0deb8db50a9cc01a2211ebaa9c7a98de2e08 (diff)
Updated to test the kind of argument correctly.
Diffstat (limited to 'lib/custodian/protocoltest')
-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