Skip to content

Commit aeff5ab

Browse files
committed
nil file path should not be accepted
1 parent af3c54c commit aeff5ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/debase.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def disable
9696

9797
def accept?(file_path)
9898
return true unless @enabled
99+
return false if file_path.nil?
99100
included.any? { |path| file_path.start_with?(path) } && excluded.all? { |path| !file_path.start_with?(path)}
100101
end
101102

lib/debase/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Debase
2-
VERSION = "0.2.0" unless defined? VERSION
2+
VERSION = "0.2.1" unless defined? VERSION
33
end

0 commit comments

Comments
 (0)