Skip to content

Commit 6d437bc

Browse files
committed
Merge branch 'pl-rubocop-const-nil' into 'master'
Fix code docs for RuboCop's helper methods See merge request gitlab-org/gitlab-ce!32937
2 parents 1928932 + 223f096 commit 6d437bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rubocop/code_reuse_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def file_path_for_node(node)
2525

2626
# Returns the name of a constant node.
2727
#
28-
# Given the AST node `(const nil :Foo)`, this method will return `:Foo`.
28+
# Given the AST node `(const nil? :Foo)`, this method will return `:Foo`.
2929
def name_of_constant(node)
3030
node.children[1]
3131
end
@@ -87,7 +87,7 @@ def in_directory?(node, directory)
8787

8888
# Returns the receiver name of a send node.
8989
#
90-
# For the AST node `(send (const nil :Foo) ...)` this would return
90+
# For the AST node `(send (const nil? :Foo) ...)` this would return
9191
# `'Foo'`.
9292
def name_of_receiver(node)
9393
name_of_constant(node.children.first).to_s

0 commit comments

Comments
 (0)