Skip to content

Commit f9c1bdc

Browse files
committed
Simplify boolean logic
1 parent e2bcab4 commit f9c1bdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/parser/option.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def sample_banner
111111
end
112112

113113
def inverse_sample
114-
return unless boolean? && name !~ /^(force|no-.*)$/
114+
return if !boolean? || name =~ /^(force|no-.*)$/
115115

116116
case @inverse
117117
when Symbol, String

0 commit comments

Comments
 (0)