From 3938e2a6d94d3af7d598b3e5339b2d182325a13b Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 20 May 2013 16:29:00 +0100 Subject: Updated to test the kind of argument correctly. --- lib/custodian/protocoltest/tcp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1