Refactor conditional logic to use a boolean connective

* Change the guard clause into a simple if/else block. I believe a
  guard clause is only useful if it happens before the majority of
  the code in the method. In this case it adds nothing, and is
  probably more difficult to understand.
This commit is contained in:
Dan Kubb 2013-07-30 02:14:27 -07:00
parent 8ba03a02f9
commit 2b6eba8ad3

View file

@ -54,16 +54,16 @@ module Mutant
#
def skip?
location = source_location
if location.nil? or BLACKLIST.match(location.first)
if location.nil? || BLACKLIST.match(location.first)
message = sprintf(
'%s does not have valid source location unable to emit matcher',
method.inspect
)
$stderr.puts(message)
return true
true
else
false
end
false
end
# Return method name