mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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:
parent
1a18454da9
commit
1a98f56ae1
3 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue