Enable Rubocop Performance/InefficientHashSearch
When used with a Hash, .keys.include?
is bad because:
- It performs a O(n) search instead of the efficient
.has_key?
- It clones all keys into separate array.
EE port: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14828
Edited by Stan Hu