Micro-optimizations around string comparisons
This commit is contained in:
parent
ed119bed7b
commit
923697b517
11 changed files with 33 additions and 26 deletions
|
@ -145,7 +145,8 @@ module Middleman
|
|||
# @param [Pathname] path
|
||||
# @return [Boolean]
|
||||
def ignored?(path)
|
||||
IGNORE_LIST.any? { |r| path.to_s.match(r) }
|
||||
path = path.to_s
|
||||
IGNORE_LIST.any? { |r| path =~ r }
|
||||
end
|
||||
|
||||
# Notify callbacks for a file given an array of callbacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue