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 8fad413 commit ac1f35f
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 ac1f35f

Please sign in to comment.