diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/net/http.rb | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 7 insertions, 2 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] + Sun Sep 13 12:07:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * include/ruby/ruby.h (SYM2ID): needs parens. diff --git a/lib/net/http.rb b/lib/net/http.rb index 8fb08870e8..efc47c0009 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1294,7 +1294,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. @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 330 +#define RUBY_PATCHLEVEL 331 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |