summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-10 16:28:52 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-10 16:28:52 +0000
commit2f29965149c61530ec23e3a7285a1f9db893f575 (patch)
tree346127adb78c38a3de183c7a137a470957b347e9 /lib
parent158277f3161284165b01a965968e674589f1110c (diff)
downloadruby-2f29965149c61530ec23e3a7285a1f9db893f575.tar.gz
ruby-2f29965149c61530ec23e3a7285a1f9db893f575.tar.xz
ruby-2f29965149c61530ec23e3a7285a1f9db893f575.zip
* lib/net/http.rb (fetch): rdoc fix, patch by Arthur Schreiber, [ruby-core:18309].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24830 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 d4cbedbda..272a63b3b 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1292,8 +1292,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(', ')