Skip to content

Commit 92c5dfd

Browse files
committed
Correct Style/RedundantRegexpEscape
1 parent 60615d0 commit 92c5dfd

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ Style/MixinUsage:
7878
Exclude:
7979
- 'spec/spec_helper.rb'
8080

81-
# Offense count: 7
82-
# This cop supports safe autocorrection (--autocorrect).
83-
Style/RedundantRegexpEscape:
84-
Exclude:
85-
- 'lib/puppet/functions/accounts_ssh_options_parser.rb'
86-
8781
# Offense count: 1
8882
# This cop supports safe autocorrection (--autocorrect).
8983
# Configuration parameters: EnforcedStyle.

lib/puppet/functions/accounts_ssh_options_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def accounts_ssh_options_parser_string(str)
1515
words = []
1616
field = ''
17-
str.scan(%r{\G\,*(?>([^\,\\\'\"]+)|'([^\']*)'|("(?:[^\"\\]|\\.)*")|(\\.?)|(\S))(\,|\z)?}m) do |word, sq, dq, esc, garbage, sep|
17+
str.scan(%r{\G,*(?>([^,\\'"]+)|'([^']*)'|("(?:[^"\\]|\\.)*")|(\\.?)|(\S))(,|\z)?}m) do |word, sq, dq, esc, garbage, sep|
1818
raise ArgumentError, _('Unmatched double quote: %{str_inspect}') % { str_inspect: str.inspect } if garbage
1919

2020
field += (word || sq || dq || esc.gsub(%r{\\(.)}, '\\1'))

0 commit comments

Comments
 (0)