Skip to content

Commit 15f1349

Browse files
Brandon Weaverhsbt
authored andcommitted
Replace Regexp in for headers for perf
1 parent eabd7d8 commit 15f1349

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/http/header.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def each_capitalized
491491
alias canonical_each each_capitalized
492492

493493
def capitalize(name)
494-
name.to_s.split(/-/).map {|s| s.capitalize }.join('-')
494+
name.to_s.split('-').map {|s| s.capitalize }.join('-')
495495
end
496496
private :capitalize
497497

0 commit comments

Comments
 (0)