diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/net/http.rb | 2 |
2 files changed, 6 insertions, 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] diff --git a/lib/net/http.rb b/lib/net/http.rb index 017a711ee..dff0d238d 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -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. |
