From d328f22c0bb504d83a1fc6246d750bec7495b69e Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 30 Dec 2023 14:59:59 +0900 Subject: [PATCH] Suppress RuboCop offenses 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 ``` --- lib/rubocop/ast/traversal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/ast/traversal.rb b/lib/rubocop/ast/traversal.rb index 7f9c48741..a50fbc18e 100644 --- a/lib/rubocop/ast/traversal.rb +++ b/lib/rubocop/ast/traversal.rb @@ -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