summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-31 13:05:18 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-31 13:05:18 +0000
commit592c5fa98c7c6825787c9d5f4a18f1bf1712094c (patch)
treea966420d489acb408acee9baa79d3ffd0cc62971 /lib
parentf557b57e67ff2cfb56de402c47341266f3e4e89d (diff)
merges r24830 from trunk into ruby_1_9_1.
-- * lib/net/http.rb (fetch): rdoc fix, patch by Arthur Schreiber, [ruby-core:18309]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 8e0c3b208f..d2a97de8d4 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1289,8 +1289,9 @@ module Net #:nodoc:
end
# Returns the header field corresponding to the case-insensitive key.
- # Returns the default value +args+, or the result of the block, or nil,
- # if there's no header field named key. See Hash#fetch
+ # Returns the default value +args+, or the result of the block, or
+ # raises an IndexErrror if there's no header field named +key+
+ # See Hash#fetch
def fetch(key, *args, &block) #:yield: +key+
a = @header.fetch(key.downcase, *args, &block)
a.join(', ')