Skip to content

Commit

Permalink
Replace Regexp in for headers for perf
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Weaver authored and hsbt committed May 30, 2024
1 parent eabd7d8 commit 15f1349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/http/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def each_capitalized
alias canonical_each each_capitalized

def capitalize(name)
name.to_s.split(/-/).map {|s| s.capitalize }.join('-')
name.to_s.split('-').map {|s| s.capitalize }.join('-')
end
private :capitalize

Expand Down

0 comments on commit 15f1349

Please sign in to comment.