Rename HTTP::Cookie#clear! to clear.

This commit is contained in:
Akinori MUSHA 2012-10-21 23:48:57 +09:00
parent fe65dbfb89
commit aa64d3d98b
2 changed files with 5 additions and 5 deletions

View file

@ -156,7 +156,7 @@ class HTTP::CookieJar
end
# Clear the cookie jar
def clear!
def clear
@jar = {}
end

View file

@ -254,7 +254,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
assert_equal(0, @jar.cookies(url).length)
end
def test_clear_bang
def test_clear
url = URI 'http://rubyforge.org/'
# Add one cookie with an expiration date in the future
@ -263,7 +263,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
@jar.add(url, HTTP::Cookie.new(cookie_values(:name => 'Baz')))
assert_equal(2, @jar.cookies(url).length)
@jar.clear!
@jar.clear
assert_equal(0, @jar.cookies(url).length)
end
@ -448,7 +448,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
in_tmpdir do
@jar.save_as("cookies.txt", :cookiestxt)
@jar.clear!
@jar.clear
@jar.load("cookies.txt", :cookiestxt)
end
@ -463,7 +463,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
in_tmpdir do
@jar.save_as("cookies.txt", :cookiestxt)
@jar.clear!
@jar.clear
@jar.load("cookies.txt", :cookiestxt)
end