Favor "unless" over "if" for negative conditions

Please refer to https://github.com/bbatsov/ruby-style-guide
bug/bundler_fix
sinn3r 2014-07-03 12:55:13 -05:00
parent 1d828a951f
commit ebeb9880a6
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class Metasploit3 < Msf::Post
end
#count the occurance of specific credentials services are running as
serviceCred = srv_conf['Credentials'].upcase
if not serviceCred == ''
unless serviceCred.empty?
if credentialCount.has_key?(serviceCred)
credentialCount[serviceCred] += 1
else