From f9c1bdcf512f712d6c2b855114fc2761fe6c4637 Mon Sep 17 00:00:00 2001 From: Carlos Palhares Date: Tue, 1 Jun 2021 15:55:10 -0300 Subject: [PATCH] Simplify boolean logic --- lib/thor/parser/option.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thor/parser/option.rb b/lib/thor/parser/option.rb index c91e708b..23092462 100644 --- a/lib/thor/parser/option.rb +++ b/lib/thor/parser/option.rb @@ -111,7 +111,7 @@ def sample_banner end def inverse_sample - return unless boolean? && name !~ /^(force|no-.*)$/ + return if !boolean? || name =~ /^(force|no-.*)$/ case @inverse when Symbol, String