Skip to content

Commit

Permalink
do not use perl backrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 14, 2015
1 parent f284b25 commit c38c697
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .rubocop.yml
Expand Up @@ -82,11 +82,6 @@ Style/FileName:
Style/MethodName:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/PerlBackrefs:
Enabled: false

# Offense count: 11
# Configuration parameters: NamePrefix, NamePrefixBlacklist.
Style/PredicateName:
Expand Down
2 changes: 1 addition & 1 deletion library/types/src/modules/URLRecode.rb
Expand Up @@ -38,7 +38,7 @@ def EscapeQuery(input)
# @param [String] input input string
# @return [String] Unescaped string
def UnEscape(input)
input.gsub(/%([0-9A-Fa-f]{2})/) { $1.to_i(16).chr }.force_encoding(input.encoding)
input.gsub(/%([0-9A-Fa-f]{2})/) { Regexp.last_match[1].to_i(16).chr }.force_encoding(input.encoding)
end

private
Expand Down

0 comments on commit c38c697

Please sign in to comment.