summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-09-12 12:51:39 +0000
committerStan Hu <stanhu@gmail.com>2019-09-12 12:51:39 +0000
commit6d437bc751867d23d13864976a90f426b3188743 (patch)
treebfc27100572a4b11328d44379b1543d013d82e4b
parent1928932388f063b064dde9d235b6474121a726c0 (diff)
parent223f096e9146a628794cdddae1d06530a115b62b (diff)
downloadgitlab-ce-6d437bc751867d23d13864976a90f426b3188743.tar.gz
Merge branch 'pl-rubocop-const-nil' into 'master'
Fix code docs for RuboCop's helper methods See merge request gitlab-org/gitlab-ce!32937
-rw-r--r--rubocop/code_reuse_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/code_reuse_helpers.rb b/rubocop/code_reuse_helpers.rb
index 0929a55d901..63019c43943 100644
--- a/rubocop/code_reuse_helpers.rb
+++ b/rubocop/code_reuse_helpers.rb
@@ -25,7 +25,7 @@ module RuboCop
# Returns the name of a constant node.
#
- # Given the AST node `(const nil :Foo)`, this method will return `:Foo`.
+ # Given the AST node `(const nil? :Foo)`, this method will return `:Foo`.
def name_of_constant(node)
node.children[1]
end
@@ -87,7 +87,7 @@ module RuboCop
# Returns the receiver name of a send node.
#
- # For the AST node `(send (const nil :Foo) ...)` this would return
+ # For the AST node `(send (const nil? :Foo) ...)` this would return
# `'Foo'`.
def name_of_receiver(node)
name_of_constant(node.children.first).to_s