Skip to content

Commit

Permalink
Fix style (Convert if-elsif to case-when)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-belkin committed Jul 16, 2020
1 parent c61aba4 commit f2ddcda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/extend/os/linux/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def allowed_missing_lib?(lib)
# Ex. 1: "libONE.so.1"
# Ex. 2: %r{(libONE|libTWO)\.so}
self.class.allowed_missing_libraries.any? do |x|
if x.is_a? Regexp
case x
when Regexp
x.match? lib
elsif x.is_a? String
when String
lib.include? x
end
end
Expand Down

0 comments on commit f2ddcda

Please sign in to comment.