From 31392046e0425f321b572896b5a19df223f6fdb6 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Tue, 22 Nov 2022 19:45:16 +0100 Subject: [PATCH] Always return `Bool` value from `Rule#excluded?` --- src/ameba/rule/base.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ameba/rule/base.cr b/src/ameba/rule/base.cr index 598f5991..bb50d296 100644 --- a/src/ameba/rule/base.cr +++ b/src/ameba/rule/base.cr @@ -88,7 +88,7 @@ module Ameba::Rule # my_rule.excluded?(source) # => true or false # ``` def excluded?(source) - excluded.try &.any? do |path| + !!excluded.try &.any? do |path| source.matches_path?(path) || Dir.glob(path).any? { |glob| source.matches_path?(glob) } end