From 3acb2e1be6ddeb421efbd1b3598c1ed547d1b38b Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 13:14:15 +0000 Subject: Avoid redudent returns. The last expression of a method is the return value. So: def foo; false ; end Is the same as: def foo; return false; end --- lib/custodian/protocoltest/tcp.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/custodian/protocoltest/tcp.rb') diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index dfaab2d..60c7be7 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -126,7 +126,7 @@ module Custodian # reset the error, in case we were previously executed. @error = nil - return( run_test_internal( @host, @port, @banner, ( ! @banner.nil? ) ) ) + ( run_test_internal( @host, @port, @banner, ( ! @banner.nil? ) ) ) end @@ -246,7 +246,7 @@ module Custodian # All was OK # @error = nil - return true + true end @@ -318,7 +318,7 @@ module Custodian return false end @error = "Misc failure" - return false + false end -- cgit v1.2.1