Micro-optimizations around string comparisons

This commit is contained in:
Ben Hollis 2013-02-09 00:20:37 -08:00
parent ed119bed7b
commit 923697b517
11 changed files with 33 additions and 26 deletions

View file

@ -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