Skip to content

Commit f605cd7

Browse files
committed
Fix rubocop: Style/SafeNavigation
Addressing: test/common/testcase.rb:20:7: C: Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method. @s.destroy if @s ^^^^^^^^^^^^^^^^
1 parent 749be45 commit f605cd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/common/testcase.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def setup
1717
end
1818

1919
def cleanup
20-
@s.destroy if @s
20+
@s&.destroy
2121
Dir.chdir '../..'
2222
OpenSCAP.raise! if OpenSCAP.error?
2323
OpenSCAP.oscap_cleanup

0 commit comments

Comments
 (0)