From 4839493f3f3419ee2be88b6160d9c3c71fbd02e2 Mon Sep 17 00:00:00 2001 From: Brandon Weaver Date: Fri, 19 May 2023 14:05:42 -0700 Subject: [PATCH] [ruby/net-http] Replace Regexp in for headers for perf https://github.com/ruby/net-http/commit/15f1349e4e --- lib/net/http/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 6660c8075a..14f6cda988 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -491,7 +491,7 @@ module Net::HTTPHeader 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