From 1a98f56ae14724611fc8f7c220e470d27f6b57e4 Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 8 Feb 2015 11:09:44 +0000 Subject: * lib/net/http/header.rb: pass header names as symbols. Patch by @DamirSvrtan [fix GH-805] * test/net/http/test_httpheader.rb: added test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 912419d..8afa32a 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -169,7 +169,7 @@ module Net::HTTPHeader alias canonical_each each_capitalized def capitalize(name) - name.split(/-/).map {|s| s.capitalize }.join('-') + name.to_s.split(/-/).map {|s| s.capitalize }.join('-') end private :capitalize -- cgit v1.1