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:
parent
8ba03a02f9
commit
2b6eba8ad3
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue