Skip to content

Commit

Permalink
Simplify boolean logic
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunior committed Jun 1, 2021
1 parent e2bcab4 commit f9c1bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thor/parser/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9c1bdc

Please sign in to comment.