Skip to content

Commit bd98b02

Browse files
committed
Lint/OutOfRangeRegexpRef
The `$1` global constant refers to the first capture group for whatever was last matched. The regexp occurs before `load_entry` is called, hence rubocop complains. However, the capture group is passed in as `entry` so just use that.
1 parent 59471ed commit bd98b02

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,6 @@ Lint/NestedMethodDefinition:
649649
- 'lib/puppet/pops/types/types.rb'
650650
- 'lib/puppet/type.rb'
651651

652-
Lint/OutOfRangeRegexpRef:
653-
Exclude:
654-
- 'lib/puppet/vendor.rb'
655-
656652
# This cop supports safe auto-correction (--auto-correct).
657653
Lint/ParenthesesAsGroupedExpression:
658654
Exclude:

lib/puppet/vendor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def vendor_dir
3232

3333
# @api private
3434
def load_entry(entry)
35-
Puppet.debug("Loading vendored #{$1}")
35+
Puppet.debug("Loading vendored #{entry}")
3636
load "#{vendor_dir}/#{entry}"
3737
end
3838

0 commit comments

Comments
 (0)