* 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
This commit is contained in:
hsbt 2015-02-08 11:09:44 +00:00
parent 1a18454da9
commit 1a98f56ae1
3 changed files with 15 additions and 1 deletions

View file

@ -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