Commit d080ec3
committed
Use
Follow-up to rubocop/rubocop-ast#377
This PR suppresses the following new offenses:
```console
$ bundle exec rubocop -a
(snip)
Offenses:
lib/rubocop/cop/performance/block_given_with_explicit_block.rb:39:41:
C: [Correctable] InternalAffairs/NodeTypeGroup: Use :any_def instead of individually listing group types.
def_node = node.each_ancestor(:def, :defs).first
^^^^^^^^^^^
lib/rubocop/cop/performance/regexp_match.rb:242:28:
C: [Correctable] InternalAffairs/NodeTypeGroup: Use :any_def instead of individually listing group types.
ancestor.type?(:def, :defs, :class, :module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 files inspected, 2 offenses detected, 2 offenses autocorrectable
```RuboCop::AST::Node#any_def_type? method1 parent 4580ea6 commit d080ec3
File tree
3 files changed
+3
-3
lines changed- lib/rubocop/cop/performance
3 files changed
+3
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
0 commit comments