This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Replace Array#| with Array#+

This is primarily for performance reasons. It yields around a 23%
improvement on a file with 300 violations.
  • Loading branch information...
seancaffery committed Jan 8, 2015
1 parent b6a1248 commit 58feada98f5c77f84684fb2b3f2761e484a2a8f9
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/ruby-lint/definition/ruby_object.rb
@@ -697,7 +697,9 @@ def determine_parent(parent, type, name, exclude = [])
if parent.type == type and parent.name == name
parent_definition = parent
else
parent_definition = parent.lookup(type, name, true, exclude | [self])
exclude = exclude + [self] unless exclude.include?(self)

parent_definition = parent.lookup(type, name, true, exclude)
end

return parent_definition

0 comments on commit 58feada

Please sign in to comment.