Skip to content

Commit

Permalink
fix: use select instead of grep
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Jun 7, 2023
1 parent d87d2c8 commit 8e7d4fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Metrics/AbcSize:

Gemspec/RequiredRubyVersion:
Enabled: false

Style/SelectByRegexp:
Enabled: false
2 changes: 1 addition & 1 deletion lib/sentry/sanitizer/cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def sanitize_headers(headers)

http_headers_regex = sensitive_regexp(http_headers)

headers.keys.grep(http_headers_regex).each do |key|
headers.keys.select { |key| key.match?(http_headers_regex) }.each do |key|
headers[key] = mask
end

Expand Down

0 comments on commit 8e7d4fa

Please sign in to comment.