Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
223f096e
Commit
223f096e
authored
Sep 12, 2019
by
Peter Leitzen
Committed by
Stan Hu
Sep 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code docs for RuboCop's helper methods
`(const nil :Foo)` vs `(const nil? :Foo)`
parent
19289323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
rubocop/code_reuse_helpers.rb
rubocop/code_reuse_helpers.rb
+2
-2
No files found.
rubocop/code_reuse_helpers.rb
View file @
223f096e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment