Skip to content

Commit 6101dfb

Browse files
committed
Fix false positive "already excluded" in tool/parse_mri_errors.rb
1 parent d2ef575 commit 6101dfb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tool/parse_mri_errors.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555

5656
FileUtils.mkdir_p(File.dirname(file))
5757
lines = File.exist?(file) ? File.readlines(file) : []
58-
if i = lines.index { |line| line.start_with?(prefix) }
58+
59+
# we need the ',' to handle a case when one test name is a substring of another test name
60+
if i = lines.index { |line| line.start_with?(prefix + ",") }
5961
puts "already excluded: #{class_name}##{test_method}"
6062
lines[i] = new_line
6163
else

0 commit comments

Comments
 (0)