From ae0b3834e7c0fe12f73ec2e362a1c9fa8d37e184 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Wed, 20 Mar 2013 01:11:17 +0900 Subject: [PATCH] Make path= accept a string-like. --- lib/http/cookie.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/http/cookie.rb b/lib/http/cookie.rb index 994f8b6..d39fa34 100644 --- a/lib/http/cookie.rb +++ b/lib/http/cookie.rb @@ -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