Skip to content
This repository has been archived by the owner. It is now read-only.
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 9, 2015
1 parent b6a1248 commit 58feada98f5c77f84684fb2b3f2761e484a2a8f9
Showing 1 changed file with 3 additions and 1 deletion.
@@ -697,7 +697,9 @@ def determine_parent(parent, type, name, exclude = [])
if parent.type == type and == name
parent_definition = parent
parent_definition = parent.lookup(type, name, true, exclude | [self])
exclude = exclude + [self] unless exclude.include?(self)

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

return parent_definition

0 comments on commit 58feada

Please sign in to comment.