summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 07:27:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 07:27:00 +0000
commit046061d0332ac3bd43e5738a81f79552727a1eb4 (patch)
treea63241e4140156b843a981d9e626356e51905210 /lib
parentb92ae42f564039f2723583f2cf46e0dd0e6bb4a3 (diff)
downloadruby-046061d0332ac3bd43e5738a81f79552727a1eb4.tar.gz
ruby-046061d0332ac3bd43e5738a81f79552727a1eb4.tar.xz
ruby-046061d0332ac3bd43e5738a81f79552727a1eb4.zip
* object.c (rb_str_to_dbl): RString ptr might be NULL.
* object.c (rb_cstr_to_dbl): p pointer might be NULL. * bignum.c (rb_str_to_inum): RString ptr might be NULL. * bignum.c (rb_cstr_to_inum): str pointer might be NULL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 0a1a714a0..6a906ad11 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -476,6 +476,11 @@ All arguments named KEY is case-insensitive.
: self[ key ] = val
sets the header field corresponding to the case-insensitive key.
+: fetch( key [,default] )
+
+ returns the header field corresponding to the case-insensitive key.
+ returns the default value if there's no header field named key.
+
: key?( key )
true if key exists.
KEY is case insensitive.
@@ -923,6 +928,10 @@ module Net
@header.delete key.downcase
end
+ def fetch(*args)
+ @header.fetch(*args)
+ end
+
def key?( key )
@header.key? key.downcase
end