summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 11:09:44 (GMT)
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 11:09:44 (GMT)
commit1a98f56ae14724611fc8f7c220e470d27f6b57e4 (patch)
tree470be2c0e8f9e42f1a60d636e6a36293b63bf3b4 /lib
parent1a18454da9bd4be564cf5df21dc2b53787527168 (diff)
* 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')
-rw-r--r--lib/net/http/header.rb2
1 files changed, 1 insertions, 1 deletions
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