Make path= accept a string-like.

This commit is contained in:
Akinori MUSHA 2013-03-20 01:11:17 +09:00
parent 59370c79c3
commit ae0b3834e7

View file

@ -421,6 +421,8 @@ class HTTP::Cookie
# See #path.
def path=(path)
path = check_string_type(path) or
raise TypeError, "#{path.class} is not a String"
@path = HTTP::Cookie.normalize_path(path)
end