Skip to content

Commit

Permalink
Suppress RuboCop offenses
Browse files Browse the repository at this point in the history
This commit suppresses the following RuboCop offenses:

```console
$ cd path/to/rubocop-ast
$ bundle exec rubocop
(snip)

lib/rubocop/ast/traversal.rb:48:26: C: [Correctable] Performance/StringIdentifierArgument:
Use :"on_#{m}" instead of "on_#{m}".
            alias_method "on_#{m}", "on_#{type}"
                         ^^^^^^^^^
lib/rubocop/ast/traversal.rb:48:37: C: [Correctable] Performance/StringIdentifierArgument:
Use :"on_#{type}" instead of "on_#{type}".
            alias_method "on_#{m}", "on_#{type}"
                                    ^^^^^^^^^^^^

163 files inspected, 2 offenses detected, 2 offenses autocorrectable
```
  • Loading branch information
koic committed Dec 30, 2023
1 parent a1d5407 commit d328f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/ast/traversal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def on_#{type}(node) # def on_send(node)
end # end
RUBY
aliases.each do |m|
alias_method "on_#{m}", "on_#{type}"
alias_method :"on_#{m}", :"on_#{type}"
end
end

Expand Down

0 comments on commit d328f22

Please sign in to comment.