Skip to content

Commit e88c4f1

Browse files
author
Tod Beardsley
committed
Switching from if mod.nil? to unless mod
Because it reads nicer, though `mod` will never be `FalseClass`
1 parent 63c66f6 commit e88c4f1

File tree

1 file changed

+2
-2
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+2
-2
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,11 +2419,11 @@ def cmd_use(*args)
24192419

24202420
begin
24212421
mod = framework.modules.create(mod_name)
2422-
if mod.nil?
2422+
unless mod
24232423
# Try one more time; see #4549
24242424
sleep 3
24252425
mod = framework.modules.create(mod_name)
2426-
if mod.nil?
2426+
unless mod
24272427
print_error("Failed to load module: #{mod_name}")
24282428
return false
24292429
end

0 commit comments

Comments
 (0)