1
0
Fork 0
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:
marcandre 2009-09-13 20:30:46 +00:00
parent 8ef3af646f
commit a0c569a378
2 changed files with 6 additions and 1 deletions

View file

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

View file

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