Skip to content

Commit 85dd4fd

Browse files
author
Brandon Weaver
committed
Replace Regexp in for headers for perf
1 parent 705e7c0 commit 85dd4fd

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)