[ruby/net-http] Replace Regexp in for headers for perf
https://github.com/ruby/net-http/commit/15f1349e4e
This commit is contained in:
parent
4d744a7aa7
commit
4839493f3f
@ -491,7 +491,7 @@ module Net::HTTPHeader
|
|||||||
alias canonical_each each_capitalized
|
alias canonical_each each_capitalized
|
||||||
|
|
||||||
def capitalize(name)
|
def capitalize(name)
|
||||||
name.to_s.split(/-/).map {|s| s.capitalize }.join('-')
|
name.to_s.split('-').map {|s| s.capitalize }.join('-')
|
||||||
end
|
end
|
||||||
private :capitalize
|
private :capitalize
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user