Skip to content

Commit 3c08f6d

Browse files
committed
Merge pull request #237 from rli9/issue_204
fix issue #204 by escape special characters in root path such as '(', ')'
2 parents 8fcc445 + f2f0307 commit 3c08f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/simplecov/defaults.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SimpleCov.profiles.define 'root_filter' do
55
# Exclude all files outside of simplecov root
66
add_filter do |src|
7-
!(src.filename =~ /^#{SimpleCov.root}/)
7+
!(src.filename =~ /^#{Regexp.escape(SimpleCov.root)}/)
88
end
99
end
1010

0 commit comments

Comments
 (0)