Fix newly found issue

This commit is contained in:
Sijawusz Pur Rahnama 2022-11-14 17:35:07 +01:00
parent cbf5d3de74
commit 3340613a6a

View file

@ -73,7 +73,7 @@ class Ameba::Spec::AnnotatedSource
private def message_to_regex(expected_annotation) private def message_to_regex(expected_annotation)
String.build do |io| String.build do |io|
offset = 0 offset = 0
while (index = expected_annotation.index(ABBREV, offset)) while index = expected_annotation.index(ABBREV, offset)
io << Regex.escape(expected_annotation[offset...index]) io << Regex.escape(expected_annotation[offset...index])
io << ".*?" io << ".*?"
offset = index + ABBREV.size offset = index + ABBREV.size