diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-08 11:09:44 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-08 11:09:44 +0000 |
commit | 1a98f56ae14724611fc8f7c220e470d27f6b57e4 (patch) | |
tree | 470be2c0e8f9e42f1a60d636e6a36293b63bf3b4 /lib/net | |
parent | 1a18454da9bd4be564cf5df21dc2b53787527168 (diff) | |
download | ruby-1a98f56ae14724611fc8f7c220e470d27f6b57e4.tar.gz |
* 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
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http/header.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 912419df55..8afa32a422 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 |