mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb (fetch): Handle properly default values; a patch by Arthur Schreiber [ruby-core:18308]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8ef3af646f
commit
a0c569a378
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Sep 14 05:21:12 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/net/http.rb (fetch): Handle properly default values; a patch by
|
||||
Arthur Schreiber [ruby-core:18308]
|
||||
|
||||
Mon Sep 14 04:07:09 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/set.rb (==): Optimization; patch by Arthur Schreiber [ruby-core:17203]
|
||||
|
|
|
@ -1297,7 +1297,7 @@ module Net #:nodoc:
|
|||
# See Hash#fetch
|
||||
def fetch(key, *args, &block) #:yield: +key+
|
||||
a = @header.fetch(key.downcase, *args, &block)
|
||||
a.join(', ')
|
||||
a.kind_of?(Array) ? a.join(', ') : a
|
||||
end
|
||||
|
||||
# Iterates for each header names and values.
|
||||
|
|
Loading…
Add table
Reference in a new issue