relevance-rcov 0.8.3.8 → 0.8.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rcov/version.rb +2 -2
- data/lib/rcov.rb +10 -8
- metadata +1 -1
data/lib/rcov/version.rb
CHANGED
data/lib/rcov.rb
CHANGED
|
@@ -210,13 +210,15 @@ class FileStatistics
|
|
|
210
210
|
# very conservative, doesn't consider the last delimited string but
|
|
211
211
|
# only the very first one
|
|
212
212
|
if md = /^[^#]*%(?:[qQ])?(.)/.match(line)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
213
|
+
if !/"%"/.match(line)
|
|
214
|
+
wanted_delimiter = /(?!\\).#{Regexp.escape(matching_delimiters[md[1]])}/
|
|
215
|
+
# check if closed on the very same line
|
|
216
|
+
# conservative again, we might have several quoted strings with the
|
|
217
|
+
# same delimiter on the same line, leaving the last one open
|
|
218
|
+
unless wanted_delimiter.match(md.post_match)
|
|
219
|
+
state = :want_end_delimiter
|
|
220
|
+
string_begin_line = i
|
|
221
|
+
end
|
|
220
222
|
end
|
|
221
223
|
end
|
|
222
224
|
when :want_end_delimiter
|
|
@@ -1006,4 +1008,4 @@ class CallSiteAnalyzer < DifferentialAnalyzer
|
|
|
1006
1008
|
|
|
1007
1009
|
end
|
|
1008
1010
|
|
|
1009
|
-
end
|
|
1011
|
+
end
|