diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-02 21:40:40 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-05 03:24:27 -0700 |
commit | d40298c8584fcd06b9549ab1674a3ec9c0ad9af0 (patch) | |
tree | 5c078a64a9130f3866a57ea5e5cf5680747511e6 /rubocop | |
parent | 0ca245317aa8fda8fc3dbab8042f5d42a41a649c (diff) | |
download | gitlab-ce-d40298c8584fcd06b9549ab1674a3ec9c0ad9af0.tar.gz |
Upgrade to Rubocop 0.68.1
This adds Ruby 2.6 support.
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/gitlab/finder_with_find_by.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/gitlab/finder_with_find_by.rb b/rubocop/cop/gitlab/finder_with_find_by.rb index f45a37ddc06..764a5073143 100644 --- a/rubocop/cop/gitlab/finder_with_find_by.rb +++ b/rubocop/cop/gitlab/finder_with_find_by.rb @@ -2,7 +2,7 @@ module RuboCop module Cop module Gitlab class FinderWithFindBy < RuboCop::Cop::Cop - FIND_PATTERN = /\Afind(_by\!?)?\z/ + FIND_PATTERN = /\Afind(_by\!?)?\z/.freeze ALLOWED_MODULES = ['FinderMethods'].freeze def message(used_method) @@ -36,7 +36,7 @@ module RuboCop def find_on_execute?(node) chained_on_node = node.descendants.first node.method_name.to_s =~ FIND_PATTERN && - chained_on_node&.method_name == :execute + chained_on_node.is_a?(RuboCop::AST::SendNode) && chained_on_node.method_name == :execute end def allowed_module?(node) |