Skip to content

Commit

Permalink
Silence @track_files_glob ivar warning
Browse files Browse the repository at this point in the history
Fixes #446.
  • Loading branch information
craiglittle committed Jan 20, 2016
1 parent a1b6e85 commit ae3507b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/simplecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def start(profile = nil, &block)
# their coverage to zero.
#
def add_not_loaded_files(result)
if @track_files_glob
if track_files_glob
result = result.dup
Dir[@track_files_glob].each do |file|
Dir[track_files_glob].each do |file|
absolute = File.expand_path(file)

result[absolute] ||= [0] * File.foreach(absolute).count
Expand Down
3 changes: 2 additions & 1 deletion lib/simplecov/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def coverage_path
# or not they were explicitly required. Without this, un-required files
# will not be present in the final report.
#
def track_files(glob)
def track_files_glob(glob = nil)
return @track_files_glob if defined?(@track_files_glob) && glob.nil?
@track_files_glob = glob
end

Expand Down

0 comments on commit ae3507b

Please sign in to comment.