From 0dd4f3a2041b531c7d34a107ee93598f0f6dcbcf Mon Sep 17 00:00:00 2001
From: Steve Kemp <steve@steve.org.uk>
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/custodian/protocoltest')

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.3