CookieJar#cookie(): Allow call without an argument.

This commit is contained in:
Akinori MUSHA 2013-04-12 01:40:17 +09:00
parent 53758d0a77
commit f1fe763007

View file

@ -85,9 +85,10 @@ class HTTP::CookieJar
self self
end end
# Gets an array of cookies that should be sent for the URL/URI, # Gets an array of cookies sorted by the path and creation time. If
# updating the access time of each cookie. # `url` is given, only ones that should be sent to the URL/URI are
def cookies(url) # selected, with the access time of each of them updated.
def cookies(url = nil)
each(url).sort each(url).sort
end end