relevance-rcov 0.8.5 → 0.8.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/rcov/version.rb +1 -1
  2. data/lib/rcov.rb +5 -5
  3. metadata +1 -1
data/lib/rcov/version.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # See LEGAL and LICENSE for licensing information.
4
4
 
5
5
  module Rcov
6
- VERSION = "0.8.5"
6
+ VERSION = "0.8.5.1"
7
7
  RELEASE_DATE = "2009-08-07"
8
8
  RCOVRT_ABI = [2,0,0]
9
9
  UPSTREAM_URL = "http://github.com/relevance/rcov"
data/lib/rcov.rb CHANGED
@@ -287,8 +287,7 @@ class FileStatistics
287
287
  scanner = StringScanner.new(@lines[i])
288
288
  j = k = i
289
289
  loop do
290
- scanned_text = scanner.search_full(/<<(-?)(?:(['"`])((?:(?!\2).)+)\2|([A-Z_a-z]\w*))/,
291
- true, true)
290
+ scanned_text = scanner.search_full(/<<(-?)(?:(['"`])((?:(?!\2).)+)\2|([A-Z_a-z]\w*))/, true, true)
292
291
  # k is the first line after the end delimiter for the last heredoc
293
292
  # scanned so far
294
293
  unless scanner.matched?
@@ -304,8 +303,7 @@ class FileStatistics
304
303
  break
305
304
  end
306
305
  must_mark = []
307
- end_of_heredoc = (scanner[1] == "-") ?
308
- /^\s*#{Regexp.escape(term)}$/ : /^#{Regexp.escape(term)}$/
306
+ end_of_heredoc = (scanner[1] == "-") ? /^\s*#{Regexp.escape(term)}$/ : /^#{Regexp.escape(term)}$/
309
307
  loop do
310
308
  break if j == @lines.size
311
309
  must_mark << j
@@ -318,7 +316,9 @@ class FileStatistics
318
316
  must_mark.each{|lineidx| @coverage[lineidx] ||= :inferred}
319
317
  end
320
318
  # move the "first line after heredocs" index
321
- k = (j += 1)
319
+ if @lines[j+=1] =~ /^\s*\n$/
320
+ k = j
321
+ end
322
322
  break
323
323
  end
324
324
  j += 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relevance-rcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Relevance