lib/cobench/match.rb in cobench-0.0.33 vs lib/cobench/match.rb in cobench-0.0.34

- old
+ new

@@ -29,14 +29,14 @@ @opts = opts @loog = loog end def matches?(repo) - if !@opts[:include].empty? && @opts[:include].none? { |m| Cobench::Mask.new(m).matches?(repo) } + if @opts[:include] && !@opts[:include].empty? && @opts[:include].none? { |m| Cobench::Mask.new(m).matches?(repo) } @loog.debug("Excluding #{repo} due to lack of --include") return false end - if @opts[:exclude].any? { |m| Cobench::Mask.new(m).matches?(repo) } + if @opts[:exclude] && @opts[:exclude].any? { |m| Cobench::Mask.new(m).matches?(repo) } @loog.debug("Excluding #{repo} due to --exclude") return false end true end