diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-17 07:27:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-17 07:27:00 +0000 |
commit | 66d1582c07db57b4a1a1cd0ab7d79f042be80faa (patch) | |
tree | a63241e4140156b843a981d9e626356e51905210 /lib | |
parent | e6c0ea3e097fb5b23e6ec3e909474063eba21306 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 0a1a714a0d..6a906ad11e 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 |