Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #536 from AlexKVal/fm_locations

remove overhead
  • Loading branch information...
commit 0cdc8d458b19ee7bb42d05a11f2d7f1facae347e 2 parents 4b91fa0 + 5e7f7d8
David Chelimsky dchelimsky authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/rspec/core/filter_manager.rb
5 lib/rspec/core/filter_manager.rb
View
@@ -121,10 +121,9 @@ def add_location(file_path, line_numbers)
# numbers to match against. e.g.
# { "path/to/file.rb" => [37, 42] }
filter_locations = @inclusions[:locations] ||= Hash.new {|h,k| h[k] = []}
- @exclusions.clear
- @inclusions.clear
filter_locations[File.expand_path(file_path)].push(*line_numbers)
- include :locations => filter_locations
+ @exclusions.clear
+ @inclusions.replace(:locations => filter_locations)
end
def empty?
Please sign in to comment.
Something went wrong with that request. Please try again.